summaryrefslogtreecommitdiffstats
path: root/lib/libc/yp
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-02-04 05:05:43 +0000
committerwpaul <wpaul@FreeBSD.org>1996-02-04 05:05:43 +0000
commitee7236e27a13ef24f71613038403f7066ce2234c (patch)
tree090dd2f2e70cc2b554fac53ce60728cfecbd15b4 /lib/libc/yp
parent7473bef6df2ea7857c391fb7697dc0f680adb558 (diff)
downloadFreeBSD-src-ee7236e27a13ef24f71613038403f7066ce2234c.zip
FreeBSD-src-ee7236e27a13ef24f71613038403f7066ce2234c.tar.gz
Make sure xdr_ypresp_all_seq() always returns a sane 'status' value.
(There were cases where it was leaving the status uninitialized.)
Diffstat (limited to 'lib/libc/yp')
-rw-r--r--lib/libc/yp/xdryp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/yp/xdryp.c b/lib/libc/yp/xdryp.c
index 51a3878..2bba485 100644
--- a/lib/libc/yp/xdryp.c
+++ b/lib/libc/yp/xdryp.c
@@ -78,7 +78,8 @@ u_long *objp;
}
if(out.more == 0) {
xdr_free(xdr_ypresp_all, (char *)&out);
- return FALSE;
+ *objp = YP_NOMORE;
+ return TRUE;
}
status = out.ypresp_all_u.val.stat;
switch(status) {
@@ -105,6 +106,7 @@ u_long *objp;
break;
case YP_NOMORE:
xdr_free(xdr_ypresp_all, (char *)&out);
+ *objp = YP_NOMORE;
return TRUE;
default:
xdr_free(xdr_ypresp_all, (char *)&out);
OpenPOWER on IntegriCloud