summaryrefslogtreecommitdiff
path: root/lib/libc/yp
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2002-01-02 20:58:38 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2002-01-02 20:58:38 +0000
commit9c2e146c324b29ff493673b8b47d761e4fa88df0 (patch)
tree4a9a1ab2ffd821052f836392711941bdb8534257 /lib/libc/yp
parentbd962896f31431d940809289907da5d46cd4447b (diff)
KNF
Diffstat (limited to 'lib/libc/yp')
-rw-r--r--lib/libc/yp/yp_all.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/libc/yp/yp_all.c b/lib/libc/yp/yp_all.c
index a858c0415ed..6219cd492a5 100644
--- a/lib/libc/yp/yp_all.c
+++ b/lib/libc/yp/yp_all.c
@@ -30,7 +30,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: yp_all.c,v 1.5 1996/12/14 06:49:46 tholo Exp $";
+static char *rcsid = "$OpenBSD: yp_all.c,v 1.6 2002/01/02 20:58:37 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -61,18 +61,18 @@ u_long *objp;
int r;
memset(&out, 0, sizeof out);
- while(1) {
- if( !xdr_ypresp_all(xdrs, &out)) {
+ while (1) {
+ if (!xdr_ypresp_all(xdrs, &out)) {
xdr_free(xdr_ypresp_all, (char *)&out);
*objp = (u_long)YP_YPERR;
return FALSE;
}
- if(out.more == 0) {
+ if (out.more == 0) {
xdr_free(xdr_ypresp_all, (char *)&out);
return FALSE;
}
status = out.ypresp_all_u.val.stat;
- switch(status) {
+ switch (status) {
case YP_TRUE:
size = out.ypresp_all_u.val.key.keydat_len;
if ((key = malloc(size + 1)) != NULL) {
@@ -87,8 +87,7 @@ u_long *objp;
out.ypresp_all_u.val.val.valdat_val,
size);
val[size] = '\0';
- }
- else {
+ } else {
free(key);
key = NULL;
}
@@ -103,7 +102,7 @@ u_long *objp;
*objp = status;
free(key);
free(val);
- if(r)
+ if (r)
return TRUE;
break;
case YP_NOMORE:
@@ -159,7 +158,7 @@ yp_all(indomain, inmap, incallback)
(void) clnt_call(clnt, YPPROC_ALL,
xdr_ypreq_nokey, &yprnk, xdr_ypresp_all_seq, &status, tv);
clnt_destroy(clnt);
- if(status != YP_FALSE)
+ if (status != YP_FALSE)
r = ypprot_err(status);
out:
_yp_unbind(ysd);