]> granicus.if.org Git - fcron/commitdiff
do not test errno after getgrnam() (it shouldn't be tested and it was created problem...
authorthib <thib>
Sun, 11 May 2008 11:08:23 +0000 (11:08 +0000)
committerthib <thib>
Sun, 11 May 2008 11:08:23 +0000 (11:08 +0000)
subs.c

diff --git a/subs.c b/subs.c
index 219f867dbfa335586ceda02fab99ee465332cbce..395c0972a24d57fca4c2f867d248f6af69352e6f 100644 (file)
--- 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);
     }