diff options
author | steve <steve@FreeBSD.org> | 1998-02-01 06:16:08 +0000 |
---|---|---|
committer | steve <steve@FreeBSD.org> | 1998-02-01 06:16:08 +0000 |
commit | 82731c60fb8729a2a94abbdddd6d03bb25ea9e41 (patch) | |
tree | bcedd810e4c27f69a7930e1a10548565d86e8079 | |
parent | af45e9528bc70b1aa2f03aa1c4cea45446340240 (diff) | |
download | FreeBSD-src-82731c60fb8729a2a94abbdddd6d03bb25ea9e41.zip FreeBSD-src-82731c60fb8729a2a94abbdddd6d03bb25ea9e41.tar.gz |
XOpen says the void setpwent(void) is correct. Also call setpassent(0)
instead of duplicating code, albeit trivial (inspired by NetBSD).
PR: 5524
-rw-r--r-- | include/pwd.h | 2 | ||||
-rw-r--r-- | lib/libc/gen/getpwent.c | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/include/pwd.h b/include/pwd.h index 0cc41bb..895ced3 100644 --- a/include/pwd.h +++ b/include/pwd.h @@ -103,7 +103,7 @@ struct passwd *getpwnam __P((const char *)); #ifndef _POSIX_SOURCE struct passwd *getpwent __P((void)); int setpassent __P((int)); -int setpwent __P((void)); +void setpwent __P((void)); void endpwent __P((void)); #endif __END_DECLS diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c index dfe5d34..1fc4fdd 100644 --- a/lib/libc/gen/getpwent.c +++ b/lib/libc/gen/getpwent.c @@ -214,15 +214,10 @@ setpassent(stayopen) return(1); } -int +void setpwent() { - _pw_keynum = 0; -#ifdef YP - _pw_stepping_yp = 0; -#endif - _pw_stayopen = 0; - return(1); + (void)setpassent(0); } void |