diff options
author | markm <markm@FreeBSD.org> | 2001-12-11 22:08:58 +0000 |
---|---|---|
committer | markm <markm@FreeBSD.org> | 2001-12-11 22:08:58 +0000 |
commit | acf06cc72a33d516ee1ff68b4480e3bca706f91a (patch) | |
tree | b2e9942d469fc9cdb76f232b92431ca8bbcfbeed /usr.bin/ypcat | |
parent | 40e227221b1f349081e2a81d68fad42112516b16 (diff) | |
download | FreeBSD-src-acf06cc72a33d516ee1ff68b4480e3bca706f91a.zip FreeBSD-src-acf06cc72a33d516ee1ff68b4480e3bca706f91a.tar.gz |
WARNS=2 fixes
__FBSDID() additions
some include file sorting.
Some Makefile sorting.
WARNS?=2 is not added to the Makefile, because it is going to be
default for usr.bin/
NO_WERROR is set because there are rpc*.h file issues.
Diffstat (limited to 'usr.bin/ypcat')
-rw-r--r-- | usr.bin/ypcat/Makefile | 1 | ||||
-rw-r--r-- | usr.bin/ypcat/ypcat.c | 38 |
2 files changed, 17 insertions, 22 deletions
diff --git a/usr.bin/ypcat/Makefile b/usr.bin/ypcat/Makefile index 58ee690..f1bd8e6 100644 --- a/usr.bin/ypcat/Makefile +++ b/usr.bin/ypcat/Makefile @@ -2,5 +2,6 @@ # $FreeBSD$ PROG= ypcat +NO_WERROR=yes .include <bsd.prog.mk> diff --git a/usr.bin/ypcat/ypcat.c b/usr.bin/ypcat/ypcat.c index f2cb022..0fd91ec 100644 --- a/usr.bin/ypcat/ypcat.c +++ b/usr.bin/ypcat/ypcat.c @@ -27,14 +27,19 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ +#include <sys/cdefs.h> + +__FBSDID("$FreeBSD$"); #include <sys/param.h> #include <sys/types.h> #include <sys/socket.h> + +#include <rpc/rpc.h> +#include <rpc/xdr.h> +#include <rpcsvc/yp_prot.h> +#include <rpcsvc/ypclnt.h> + #include <ctype.h> #include <err.h> #include <stdio.h> @@ -42,13 +47,8 @@ static const char rcsid[] = #include <string.h> #include <unistd.h> -#include <rpc/rpc.h> -#include <rpc/xdr.h> -#include <rpcsvc/yp_prot.h> -#include <rpcsvc/ypclnt.h> - struct ypalias { - char *alias, *name; + const char *alias, *name; } ypaliases[] = { { "passwd", "passwd.byname" }, { "master.passwd", "master.passwd.byname" }, @@ -64,7 +64,7 @@ struct ypalias { int key; static void -usage() +usage(void) { fprintf(stderr, "%s\n%s\n", "usage: ypcat [-k] [-d domainname] [-t] mapname", @@ -72,14 +72,8 @@ usage() exit(1); } -int -printit(instatus, inkey, inkeylen, inval, invallen, indata) -int instatus; -char *inkey; -int inkeylen; -char *inval; -int invallen; -char *indata; +static int +printit(unsigned long instatus, char *inkey, int inkeylen, char *inval, int invallen, void *dummy __unused) { if(instatus != YP_TRUE) return instatus; @@ -90,14 +84,14 @@ char *indata; } int -main(argc, argv) -char **argv; +main(int argc, char *argv[]) { char *domainname = NULL; struct ypall_callback ypcb; char *inmap; int notrans; - int c, r, i; + int c, r; + u_int i; notrans = key = 0; |