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/getgrgid.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'libc/pwd_grp/getgrgid.c') 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 #include -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; } - - - - -- cgit v1.2.3