From a42a105966d05df2ce9afefc387c99ac919fdfc4 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 27 Jun 2003 19:35:17 +0000 Subject: ret could have been used uninitialized in one case --- libc/pwd_grp/pwent.c | 2 +- libc/pwd_grp/spent.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'libc/pwd_grp') diff --git a/libc/pwd_grp/pwent.c b/libc/pwd_grp/pwent.c index 51d2fba96..b8ae812cb 100644 --- a/libc/pwd_grp/pwent.c +++ b/libc/pwd_grp/pwent.c @@ -67,7 +67,7 @@ void endpwent(void) int getpwent_r (struct passwd *password, char *buff, size_t buflen, struct passwd **result) { - int ret; + int ret=EINVAL; LOCK; *result = NULL; if (pw_fd != -1 && (ret=__getpwent_r(password, buff, buflen, pw_fd)) == 0) { diff --git a/libc/pwd_grp/spent.c b/libc/pwd_grp/spent.c index 734854b24..46f3a32be 100644 --- a/libc/pwd_grp/spent.c +++ b/libc/pwd_grp/spent.c @@ -64,7 +64,7 @@ void endspent(void) int getspent_r (struct spwd *spwd, char *buff, size_t buflen, struct spwd **result) { - int ret; + int ret=EINVAL; LOCK; *result = NULL; if (spwd_fd != -1 && (ret=__getspent_r(spwd, buff, buflen, spwd_fd)) == 0) { -- cgit v1.2.3