diff --git a/usr.bin/ypmatch/ypmatch.c b/usr.bin/ypmatch/ypmatch.c index 66fa84aae100..a57a642a435d 100644 --- a/usr.bin/ypmatch/ypmatch.c +++ b/usr.bin/ypmatch/ypmatch.c @@ -34,20 +34,19 @@ __FBSDID("$FreeBSD$"); #include #include #include + +#include +#include #include #include #include #include -#include -#include #include #include #include #include -void usage(void); - static const struct ypalias { char *alias, *name; } ypaliases[] = { @@ -63,11 +62,11 @@ static const struct ypalias { { "ethers", "ethers.byname" }, }; -void +static void usage(void) { - fprintf(stderr, - "usage: ypmatch [-kt] [-d domain] key ... mapname\n" + fprintf(stderr, "%s\n%s\n", + "usage: ypmatch [-kt] [-d domain] key ... mapname", " ypmatch -x\n"); fprintf(stderr, "where\n" @@ -82,8 +81,6 @@ int main(int argc, char *argv[]) { char *domainname, *inkey, *inmap, *outbuf; - extern char *optarg; - extern int optind; int outbuflen, key, notrans, rval; int c, r; u_int i; @@ -114,12 +111,12 @@ main(int argc, char *argv[]) if ((argc-optind) < 2 ) usage(); - if (!domainname) { + if (domainname == NULL) { yp_get_default_domain(&domainname); } inmap = argv[argc-1]; - if (!notrans) { + if (notrans == 0) { for (i=0; i