From c74f93245af8e362d24845b3d326836fd1abcf8e Mon Sep 17 00:00:00 2001 From: Thibault Godouet Date: Sun, 11 May 2008 11:08:23 +0000 Subject: [PATCH] do not test errno after getgrnam() (it shouldn't be tested and it was created problems on some non-linux systems) --- subs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/subs.c b/subs.c index 219f867..395c097 100644 --- a/subs.c +++ b/subs.c @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: subs.c,v 1.28 2007-06-03 17:52:53 thib Exp $ */ + /* $Id: subs.c,v 1.29 2008-05-11 11:08:23 thib Exp $ */ #include "global.h" #include "subs.h" @@ -65,11 +65,11 @@ gid_t get_group_gid_safe(char *groupname) /* get the gid of group groupname, and die on error */ { - struct group *grp; + struct group *grp = NULL; errno = 0; grp = getgrnam(groupname); - if ( errno != 0 || grp == NULL ) { + if ( grp == NULL ) { die_e("Unable to get the gid of group %s", groupname); } -- 2.47.3