summaryrefslogtreecommitdiff
path: root/utils/w.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1998-07-20 06:57:23 +0000
committerRoland McGrath <roland@gnu.org>1998-07-20 06:57:23 +0000
commit2ddf2e0d1f15e66a6b8e1121d76c62dfa68ef94f (patch)
tree2321a154de9873b06fcdc0a91fc832584d509796 /utils/w.c
parent904537365266ddea9e45dcef10080f42fabd4dbe (diff)
1998-07-20 Roland McGrath <roland@baalperazim.frob.com>
* ps.c (main): Fix return type to int, and use return. * ids.c (main): Likewise. * w.c (main): Likewise. * login.c (main): Likewise. * settrans.c (main): Likewise. * showtrans.c (main): Likewise. * fsysopts.c (main): Likewise. * storeinfo.c (main): Likewise. * w.c (main): Avoid warning from `while (a = b)'.
Diffstat (limited to 'utils/w.c')
-rw-r--r--utils/w.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/w.c b/utils/w.c
index ce41de2d..1107bb05 100644
--- a/utils/w.c
+++ b/utils/w.c
@@ -1,6 +1,6 @@
/* Hurdish w
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -344,7 +344,7 @@ uptime (struct proc_stat_list *procs)
fmt_named_interval (&uptime, 0, uptime_rep, sizeof (uptime_rep));
}
- strftime (tod_rep, sizeof (tod_rep), "%r",
+ strftime (tod_rep, sizeof (tod_rep), "%r",
localtime ((time_t *)&now.tv_sec));
if (tod_rep[0] == '0')
tod_rep[0] = ' '; /* Get rid of bletcherous leading 0. */
@@ -360,7 +360,7 @@ uptime (struct proc_stat_list *procs)
(double)load->avenrun[2] / (double)LOAD_SCALE);
}
-void
+int
main(int argc, char *argv[])
{
error_t err;
@@ -446,7 +446,7 @@ main(int argc, char *argv[])
/* Read the utmp file. */
setutent ();
- while (ut = getutent ())
+ while ((ut = getutent ()) != NULL)
add_utmp_procs (procs, ut);
endutent ();
@@ -464,5 +464,5 @@ main(int argc, char *argv[])
output_width, print_heading,
squash_bogus_fields, squash_nominal_fields, 0);
- exit(0);
+ return 0;
}