Few more style nits.
MFC after: 1 month
This commit is contained in:
parent
7c33a30a7a
commit
d7499324a8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=252599
@ -188,18 +188,14 @@ main(int argc, char *argv[])
|
||||
time_t t;
|
||||
|
||||
t = _int_to_time(mp->myutmp.out_time);
|
||||
strftime(cbuf, sizeof(cbuf),
|
||||
d_first ? "%e %b %R" : "%b %e %R",
|
||||
strftime(cbuf, sizeof(cbuf), d_first ? "%e %b %R" : "%b %e %R",
|
||||
localtime(&t));
|
||||
(void) sprintf(buf, "%s:%-.*s", mp->myhost,
|
||||
(int)sizeof(mp->myutmp.out_line), mp->myutmp.out_line);
|
||||
printf("%-*.*s %-*s %s",
|
||||
(int)sizeof(mp->myutmp.out_name),
|
||||
(int)sizeof(mp->myutmp.out_name),
|
||||
mp->myutmp.out_name,
|
||||
width,
|
||||
buf,
|
||||
cbuf);
|
||||
mp->myutmp.out_name, width, buf, cbuf);
|
||||
mp->myidle /= 60;
|
||||
if (mp->myidle != 0) {
|
||||
if (aflg != 0) {
|
||||
@ -224,6 +220,7 @@ main(int argc, char *argv[])
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
fprintf(stderr, "usage: rwho [-a]\n");
|
||||
exit(1);
|
||||
}
|
||||
@ -242,6 +239,6 @@ utmpcmp(const void *u1, const void *u2)
|
||||
rc = strcmp(MYUTMP(u1)->myhost, MYUTMP(u2)->myhost);
|
||||
if (rc != 0)
|
||||
return (rc);
|
||||
return (strncmp(MYUTMP(u1)->myutmp.out_line, MYUTMP(u2)->myutmp.out_line,
|
||||
sizeof(MYUTMP(u2)->myutmp.out_line)));
|
||||
return (strncmp(MYUTMP(u1)->myutmp.out_line,
|
||||
MYUTMP(u2)->myutmp.out_line, sizeof(MYUTMP(u2)->myutmp.out_line)));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user