From e2aa1f4fa9a36d223e271cc24dfad691f6a56d12 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 7 Oct 2000 23:46:22 +0000 Subject: Formatting update --- libc/pwd_grp/getpwuid.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'libc/pwd_grp/getpwuid.c') diff --git a/libc/pwd_grp/getpwuid.c b/libc/pwd_grp/getpwuid.c index ffd58c1f0..1cd0d691c 100644 --- a/libc/pwd_grp/getpwuid.c +++ b/libc/pwd_grp/getpwuid.c @@ -23,22 +23,20 @@ #include #include -struct passwd * -getpwuid(uid_t uid) +struct passwd *getpwuid(uid_t uid) { - int passwd_fd; - struct passwd * passwd; + int passwd_fd; + struct passwd *passwd; - if ((passwd_fd=open("/etc/passwd", O_RDONLY))<0) - return NULL; + if ((passwd_fd = open("/etc/passwd", O_RDONLY)) < 0) + return NULL; - while ((passwd=__getpwent(passwd_fd))!=NULL) - if (passwd->pw_uid==uid) - { - close(passwd_fd); - return passwd; - } + while ((passwd = __getpwent(passwd_fd)) != NULL) + if (passwd->pw_uid == uid) { + close(passwd_fd); + return passwd; + } - close (passwd_fd); - return NULL; + close(passwd_fd); + return NULL; } -- cgit v1.2.3