summaryrefslogtreecommitdiff
path: root/libc/pwd_grp/putpwent.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/pwd_grp/putpwent.c')
-rw-r--r--libc/pwd_grp/putpwent.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/libc/pwd_grp/putpwent.c b/libc/pwd_grp/putpwent.c
index a0035ea98..da8e13d67 100644
--- a/libc/pwd_grp/putpwent.c
+++ b/libc/pwd_grp/putpwent.c
@@ -22,18 +22,17 @@
#include <errno.h>
#include <pwd.h>
-int
-putpwent(const struct passwd * passwd, FILE * f)
+int putpwent(const struct passwd *passwd, FILE * f)
{
- if (passwd == NULL || f == NULL)
- {
- errno=EINVAL;
- return -1;
- }
- if (fprintf(f, "%s:%s:%u:%u:%s:%s:%s\n", passwd->pw_name, passwd->pw_passwd,
- passwd->pw_gid, passwd->pw_uid, passwd->pw_gecos,
- passwd->pw_dir, passwd->pw_shell)<0)
- return -1;
+ if (passwd == NULL || f == NULL) {
+ errno = EINVAL;
+ return -1;
+ }
+ if (fprintf
+ (f, "%s:%s:%u:%u:%s:%s:%s\n", passwd->pw_name, passwd->pw_passwd,
+ passwd->pw_gid, passwd->pw_uid, passwd->pw_gecos, passwd->pw_dir,
+ passwd->pw_shell) < 0)
+ return -1;
- return 0;
+ return 0;
}