diff options
author | markm <markm@FreeBSD.org> | 2002-04-28 11:13:20 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2002-04-28 11:13:20 +0000 |
commit | f7c4d20a390b1bef4ad58b3ce7f50561cfa60a70 (patch) | |
tree | 5873a8af7eb020c1658ce5eeaa8f27bbc8e04c7d /usr.bin/rusers | |
parent | f7a5378f71cc58edc03a69ca732fad3a7ce3464a (diff) | |
download | FreeBSD-src-f7c4d20a390b1bef4ad58b3ce7f50561cfa60a70.zip FreeBSD-src-f7c4d20a390b1bef4ad58b3ce7f50561cfa60a70.tar.gz |
Trivial warnings fixes; staticise and use unsigned.
Use __FBSDID().
Diffstat (limited to 'usr.bin/rusers')
-rw-r--r-- | usr.bin/rusers/rusers.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/usr.bin/rusers/rusers.c b/usr.bin/rusers/rusers.c index bd275b5..41c30c5 100644 --- a/usr.bin/rusers/rusers.c +++ b/usr.bin/rusers/rusers.c @@ -31,22 +31,24 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include <sys/cdefs.h> + +__FBSDID("$FreeBSD$"); #include <sys/types.h> #include <sys/socket.h> + #include <rpc/rpc.h> #include <rpc/pmap_clnt.h> #include <rpcsvc/rnusers.h> + #include <arpa/inet.h> + #include <err.h> #include <netdb.h> #include <stdio.h> #include <stdlib.h> -#include <strings.h> +#include <string.h> #include <unistd.h> #define MAX_INT 0x7fffffff @@ -61,7 +63,7 @@ struct host_list { struct in_addr addr; } *hosts; -int +static int search_host(struct in_addr addr) { struct host_list *hp; @@ -76,7 +78,7 @@ search_host(struct in_addr addr) return (0); } -void +static void remember_host(struct in_addr addr) { struct host_list *hp; @@ -88,10 +90,11 @@ remember_host(struct in_addr addr) hosts = hp; } -int +static int rusers_reply(caddr_t replyp, struct sockaddr_in *raddrp) { - int x, idle; + u_int x; + int idle; char date[32], idle_time[64], remote[64]; struct hostent *hp; utmpidlearr *up = (utmpidlearr *)replyp; @@ -165,7 +168,7 @@ rusers_reply(caddr_t replyp, struct sockaddr_in *raddrp) return (0); } -void +static void onehost(char *host) { utmpidlearr up; @@ -193,8 +196,8 @@ onehost(char *host) clnt_destroy(rusers_clnt); } -void -allhosts() +static void +allhosts(void) { utmpidlearr up; enum clnt_stat clnt_stat; @@ -208,7 +211,7 @@ allhosts() } static void -usage() +usage(void) { fprintf(stderr, "usage: rusers [-la] [hosts ...]\n"); |