From 231c769f65bbbbd615ecc36096f3ac387026b301 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 22 Apr 1997 01:49:16 +0000 Subject: [PATCH] indent --- usr.bin/ypwhich/ypwhich.c | 57 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/usr.bin/ypwhich/ypwhich.c b/usr.bin/ypwhich/ypwhich.c index 23fe996c1de..dd19a34ffe9 100644 --- a/usr.bin/ypwhich/ypwhich.c +++ b/usr.bin/ypwhich/ypwhich.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypwhich.c,v 1.4 1996/06/05 23:56:00 deraadt Exp $ +/* $OpenBSD: ypwhich.c,v 1.5 1997/04/22 01:49:16 deraadt Exp $ /* $NetBSD: ypwhich.c,v 1.6 1996/05/13 02:43:48 thorpej Exp $ */ /* @@ -34,7 +34,7 @@ */ #ifndef LINT -static char rcsid[] = "$Id: ypwhich.c,v 1.4 1996/06/05 23:56:00 deraadt Exp $"; +static char rcsid[] = "$Id: ypwhich.c,v 1.5 1997/04/22 01:49:16 deraadt Exp $"; #endif #include @@ -90,25 +90,25 @@ struct sockaddr_in *sin; tv.tv_sec = 15; tv.tv_usec = 0; client = clntudp_create(sin, YPBINDPROG, YPBINDVERS, tv, &sock); - if(client==NULL) { + if (client==NULL) { fprintf(stderr, "can't clntudp_create: %s\n", - yperr_string(YPERR_YPBIND)); + yperr_string(YPERR_YPBIND)); return YPERR_YPBIND; } tv.tv_sec = 5; tv.tv_usec = 0; r = clnt_call(client, YPBINDPROC_DOMAIN, - xdr_domainname, &dom, xdr_ypbind_resp, &ypbr, tv); - if( r != RPC_SUCCESS) { + xdr_domainname, &dom, xdr_ypbind_resp, &ypbr, tv); + if (r != RPC_SUCCESS) { fprintf(stderr, "can't clnt_call: %s\n", - yperr_string(YPERR_YPBIND)); + yperr_string(YPERR_YPBIND)); clnt_destroy(client); return YPERR_YPBIND; } else { if (ypbr.ypbind_status != YPBIND_SUCC_VAL) { fprintf(stderr, "can't yp_bind: Reason: %s\n", - yperr_string(ypbr.ypbind_status)); + yperr_string(ypbr.ypbind_status)); clnt_destroy(client); return r; } @@ -141,13 +141,12 @@ char **argv; map = NULL; getmap = notrans = mode = 0; - while( (c=getopt(argc, argv, "xd:mt")) != -1) - switch(c) { + while ((c=getopt(argc, argv, "xd:mt")) != -1) + switch (c) { case 'x': - for(i=0; ih_addr, - (char *)&sin.sin_addr, sizeof sin.sin_addr); + (char *)&sin.sin_addr, sizeof sin.sin_addr); } - if(bind_host(domain, &sin)) + if (bind_host(domain, &sin)) exit(1); break; default: @@ -196,16 +195,16 @@ char **argv; exit(0); } - if( argc > 1) + if (argc > 1) usage(); - if(argv[0]) { + if (argv[0]) { map = argv[0]; - for(i=0; (!notrans) && imap, &master); switch(r) { @@ -236,8 +235,8 @@ char **argv; break; default: fprintf(stderr, - "YP: can't find the master of %s: Reason: %s\n", - ypml->map, yperr_string(r)); + "YP: can't find the master of %s: Reason: %s\n", + ypml->map, yperr_string(r)); break; } y = ypml->next; @@ -249,7 +248,7 @@ char **argv; exit(1); default: fprintf(stderr, "Can't get map list for domain %s. Reason: %s\n", - domain, yperr_string(r)); + domain, yperr_string(r)); exit(1); } exit(0); -- 2.20.1