diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 13:30:31 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2002-02-06 13:30:31 +0000 |
commit | ed4d1c46a27632aa553e7c24c969262bfc2d5c97 (patch) | |
tree | d44f2702502c982570c85130c91c845a83ea8052 /usr.bin/ypcat | |
parent | 8bf216d4a39b268cd561eb5e3a90ba41ef5e733f (diff) | |
download | src-test2-ed4d1c46a27632aa553e7c24c969262bfc2d5c97.tar.gz src-test2-ed4d1c46a27632aa553e7c24c969262bfc2d5c97.zip |
Notes
Diffstat (limited to 'usr.bin/ypcat')
-rw-r--r-- | usr.bin/ypcat/ypcat.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/ypcat/ypcat.c b/usr.bin/ypcat/ypcat.c index 0fd91ec0effd..033d343f0636 100644 --- a/usr.bin/ypcat/ypcat.c +++ b/usr.bin/ypcat/ypcat.c @@ -75,12 +75,12 @@ usage(void) static int printit(unsigned long instatus, char *inkey, int inkeylen, char *inval, int invallen, void *dummy __unused) { - if(instatus != YP_TRUE) - return instatus; - if(key) + if (instatus != YP_TRUE) + return (instatus); + if (key) printf("%*.*s ", inkeylen, inkeylen, inkey); printf("%*.*s\n", invallen, invallen, inval); - return 0; + return (0); } int @@ -95,10 +95,10 @@ main(int argc, char *argv[]) notrans = key = 0; - while( (c=getopt(argc, argv, "xd:kt")) != -1) - switch(c) { + while ((c = getopt(argc, argv, "xd:kt")) != -1) + switch (c) { case 'x': - for(i=0; i<sizeof ypaliases/sizeof ypaliases[0]; i++) + for (i = 0; i<sizeof ypaliases/sizeof ypaliases[0]; i++) printf("Use \"%s\" for \"%s\"\n", ypaliases[i].alias, ypaliases[i].name); @@ -116,21 +116,21 @@ main(int argc, char *argv[]) usage(); } - if(optind + 1 != argc ) + if (optind + 1 != argc) usage(); if (!domainname) yp_get_default_domain(&domainname); inmap = argv[optind]; - for(i=0; (!notrans) && i<sizeof ypaliases/sizeof ypaliases[0]; i++) - if( strcmp(inmap, ypaliases[i].alias) == 0) + for (i = 0; (!notrans) && i<sizeof ypaliases/sizeof ypaliases[0]; i++) + if (strcmp(inmap, ypaliases[i].alias) == 0) inmap = ypaliases[i].name; ypcb.foreach = printit; ypcb.data = NULL; r = yp_all(domainname, inmap, &ypcb); - switch(r) { + switch (r) { case 0: break; case YPERR_YPBIND: |