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:
parent
e2e5ad34fb
commit
2e645a20cb
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user