From e6330ffeeef3f149ddd9a6eb388d2d8ec94698af Mon Sep 17 00:00:00 2001 From: Marcelo Araujo Date: Fri, 7 Aug 2015 02:37:47 +0000 Subject: [PATCH] Get closest as possible with style(9). No functional change. Differential Revision: D3295 Reviewed by: bapt --- usr.bin/ypmatch/ypmatch.c | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) 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