From e93fa004d7133433f07d726dd1c93c2b6f91864f Mon Sep 17 00:00:00 2001 From: markm Date: Sun, 28 Apr 2002 10:49:15 +0000 Subject: Style only; format function declarations, sort header includes, and use __FBSDID(). --- usr.bin/rup/rup.c | 46 ++++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 20 deletions(-) (limited to 'usr.bin/rup/rup.c') diff --git a/usr.bin/rup/rup.c b/usr.bin/rup/rup.c index b660b81..c078a95 100644 --- a/usr.bin/rup/rup.c +++ b/usr.bin/rup/rup.c @@ -31,27 +31,31 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include + +__FBSDID("$FreeBSD$"); -#include -#include -#include -#include -#include -#include #include #include -#include + #include #include -#include + #undef FSHIFT /* Use protocol's shift and scale values */ #undef FSCALE + #include +#include + +#include +#include +#include +#include +#include +#include +#include + #define HOST_WIDTH 15 struct host_list { @@ -59,7 +63,8 @@ struct host_list { struct in_addr addr; } *hosts; -int search_host(struct in_addr addr) +static int +search_host(struct in_addr addr) { struct host_list *hp; @@ -73,7 +78,8 @@ int search_host(struct in_addr addr) return(0); } -void remember_host(struct in_addr addr) +static void +remember_host(struct in_addr addr) { struct host_list *hp; @@ -84,7 +90,7 @@ void remember_host(struct in_addr addr) hosts = hp; } -int +static int rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp) { struct tm *tmp_time; @@ -152,7 +158,7 @@ rstat_reply(caddr_t replyp, struct sockaddr_in *raddrp) return(0); } -int +static int onehost(char *host) { CLIENT *rstat_clnt; @@ -188,21 +194,21 @@ onehost(char *host) return (0); } -void -allhosts() +static void +allhosts(void) { statstime host_stat; enum clnt_stat clnt_stat; clnt_stat = clnt_broadcast(RSTATPROG, RSTATVERS_TIME, RSTATPROC_STATS, xdr_void, NULL, - xdr_statstime, (char *)&host_stat, rstat_reply); + xdr_statstime, &host_stat, rstat_reply); if (clnt_stat != RPC_SUCCESS && clnt_stat != RPC_TIMEDOUT) errx(1, "%s", clnt_sperrno(clnt_stat)); } static void -usage() +usage(void) { fprintf(stderr, "usage: rup [hosts ...]\n"); exit(1); -- cgit v1.1