=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rup/rup.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- src/usr.bin/rup/rup.c 2005/11/17 19:31:54 1.21 +++ src/usr.bin/rup/rup.c 2005/11/17 19:55:05 1.22 @@ -1,4 +1,4 @@ -/* $OpenBSD: rup.c,v 1.21 2005/11/17 19:31:54 moritz Exp $ */ +/* $OpenBSD: rup.c,v 1.22 2005/11/17 19:55:05 moritz Exp $ */ /*- * Copyright (c) 1993, John Brezak @@ -29,7 +29,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: rup.c,v 1.21 2005/11/17 19:31:54 moritz Exp $"; +static char rcsid[] = "$OpenBSD: rup.c,v 1.22 2005/11/17 19:55:05 moritz Exp $"; #endif /* not lint */ #include @@ -64,7 +64,7 @@ search_host(struct in_addr addr) { struct host_list *hp; - + if (!hosts) return(0); @@ -143,7 +143,7 @@ rup_data = newrup; rup_data_max = newsize; } - + if ((rup_data[rup_data_idx].host = strdup(host)) == NULL) err(1, NULL); rup_data[rup_data_idx].statstime = *st; @@ -196,12 +196,12 @@ host_stat->curtime.tv_sec -= host_stat->boottime.tv_sec; if (host_stat->curtime.tv_sec > 0) - ups=host_stat->curtime.tv_sec; - upd=ups/(3600*24); - ups-=upd*3600*24; - uph=ups/3600; - ups-=uph*3600; - upm=ups/60; + ups = host_stat->curtime.tv_sec; + upd = ups / (3600 * 24); + ups -= upd * 3600 * 24; + uph = ups / 3600; + ups -= uph * 3600; + upm = ups / 60; if (upd != 0) snprintf(days_buf, sizeof days_buf, "%3u day%s, ", upd, @@ -227,9 +227,9 @@ printf(" up %9.9s%9.9s load average: %.2f %.2f %.2f\n", days_buf, hours_buf, - (double)host_stat->avenrun[0]/FSCALE, - (double)host_stat->avenrun[1]/FSCALE, - (double)host_stat->avenrun[2]/FSCALE); + (double)host_stat->avenrun[0] / FSCALE, + (double)host_stat->avenrun[1] / FSCALE, + (double)host_stat->avenrun[2] / FSCALE); return(0); } @@ -242,7 +242,7 @@ statstime host_stat; static struct timeval timeout = {25, 0}; extern char *__progname; - + rstat_clnt = clnt_create(host, RSTATPROG, RSTATVERS_TIME, "udp"); if (rstat_clnt == NULL) { fprintf(stderr, "%s: %s", __progname, @@ -313,7 +313,7 @@ usage(); /*NOTREACHED*/ } - + setlinebuf(stdout); if (argc == optind)