diff options
Diffstat (limited to 'libc/pwd_grp/pwent.c')
-rw-r--r-- | libc/pwd_grp/pwent.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/libc/pwd_grp/pwent.c b/libc/pwd_grp/pwent.c index 51f76b53f..475c8e560 100644 --- a/libc/pwd_grp/pwent.c +++ b/libc/pwd_grp/pwent.c @@ -33,30 +33,24 @@ /* file descriptor for the password file currently open */ static int pw_fd = -1; -void -setpwent(void) +void setpwent(void) { - if (pw_fd!=-1) - close(pw_fd); + if (pw_fd != -1) + close(pw_fd); - pw_fd=open("/etc/passwd", O_RDONLY); + pw_fd = open("/etc/passwd", O_RDONLY); } -void -endpwent(void) +void endpwent(void) { - if (pw_fd!=-1) - close(pw_fd); - pw_fd=-1; + if (pw_fd != -1) + close(pw_fd); + pw_fd = -1; } -struct passwd * -getpwent(void) +struct passwd *getpwent(void) { - if (pw_fd!=-1) - return (__getpwent(pw_fd)); - return NULL; + if (pw_fd != -1) + return (__getpwent(pw_fd)); + return NULL; } - - - |