From ee7236e27a13ef24f71613038403f7066ce2234c Mon Sep 17 00:00:00 2001 From: wpaul Date: Sun, 4 Feb 1996 05:05:43 +0000 Subject: Make sure xdr_ypresp_all_seq() always returns a sane 'status' value. (There were cases where it was leaving the status uninitialized.) --- lib/libc/yp/xdryp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/libc') 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); -- cgit v1.1