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/getgrnam.c | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'libc/pwd_grp/getgrnam.c') diff --git a/libc/pwd_grp/getgrnam.c b/libc/pwd_grp/getgrnam.c index e6c27fc57..999404284 100644 --- a/libc/pwd_grp/getgrnam.c +++ b/libc/pwd_grp/getgrnam.c @@ -24,28 +24,25 @@ #include #include -struct group * -getgrnam(const char * name) +struct group *getgrnam(const char *name) { - int grp_fd; - struct group * group; + int grp_fd; + struct group *group; - if (name==NULL) - { - errno=EINVAL; - return NULL; - } + if (name == NULL) { + errno = EINVAL; + return NULL; + } - 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 (!strcmp(group->gr_name, name)) - { - close(grp_fd); - return group; - } + while ((group = __getgrent(grp_fd)) != NULL) + if (!strcmp(group->gr_name, name)) { + close(grp_fd); + return group; + } - close(grp_fd); - return NULL; + close(grp_fd); + return NULL; } -- cgit v1.2.3