XOpen says the void setpwent(void) is correct. Also call setpassent(0)

instead of duplicating code, albeit trivial (inspired by NetBSD).

PR:		5524
This commit is contained in:
Steve Price 1998-02-01 06:16:08 +00:00
parent e2e5ad34fb
commit 2e645a20cb
2 changed files with 3 additions and 8 deletions

View File

@ -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

View File

@ -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