diff options
author | Eric Andersen <andersen@codepoet.org> | 2000-10-07 23:46:22 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2000-10-07 23:46:22 +0000 |
commit | e2aa1f4fa9a36d223e271cc24dfad691f6a56d12 (patch) | |
tree | ff7678cf744386be5015ae0385a83410ddaca4d9 /libc/pwd_grp/getgrgid.c | |
parent | 59030d6f8ae481f69966aa9e1062af461b50e1b0 (diff) | |
download | uClibc-alpine-e2aa1f4fa9a36d223e271cc24dfad691f6a56d12.tar.bz2 uClibc-alpine-e2aa1f4fa9a36d223e271cc24dfad691f6a56d12.tar.xz |
Formatting update
Diffstat (limited to 'libc/pwd_grp/getgrgid.c')
-rw-r--r-- | libc/pwd_grp/getgrgid.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/libc/pwd_grp/getgrgid.c b/libc/pwd_grp/getgrgid.c index c1dd20e35..fa74a9644 100644 --- a/libc/pwd_grp/getgrgid.c +++ b/libc/pwd_grp/getgrgid.c @@ -23,26 +23,20 @@ #include <fcntl.h> #include <grp.h> -struct group * -getgrgid(const gid_t gid) +struct group *getgrgid(const gid_t gid) { - struct group * group; - int grp_fd; + struct group *group; + int grp_fd; - if ((grp_fd=open("/etc/group", O_RDONLY))<0) - return NULL; + if ((grp_fd = open("/etc/group", O_RDONLY)) < 0) + return NULL; - while ((group=__getgrent(grp_fd))!=NULL) - if (group->gr_gid==gid) - { - close(grp_fd); - return group; - } + while ((group = __getgrent(grp_fd)) != NULL) + if (group->gr_gid == gid) { + close(grp_fd); + return group; + } - close(grp_fd); - return NULL; + close(grp_fd); + return NULL; } - - - - |