]> granicus.if.org Git - shadow/commitdiff
* src/groupmod.c: Avoid implicit conversion of pointer to boolean.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 8 Jul 2011 19:58:40 +0000 (19:58 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Fri, 8 Jul 2011 19:58:40 +0000 (19:58 +0000)
* src/groupmod.c: osgrp can be set only if pflg || nflg. No need
to check for pflg || nflg again

ChangeLog
src/groupmod.c

index 7e7b25fecabc7078fbfb80c41ed8e2244d8fdf4c..f51b9c829b81a7bf6c78ea877a7aba87e86ee93d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,9 @@
        * src/vipw.c: Use Prog instead of progname. This is needed since
        Prog is used in the library.
        * configure.in: Fix typo. libcrack default is 'no'.
+       * src/groupmod.c: Avoid implicit conversion of pointer to boolean.
+       * src/groupmod.c: osgrp can be set only if pflg || nflg. No need
+       to check for pflg || nflg again
 
 2011-07-08  Nicolas François  <nicolas.francois@centraliens.net>
 
index 7d0d3fbcaea23b6cf7b04ed8eb79a9466da549ef..65d50bec59d7743beb916f29d05244271a1004c8 100644 (file)
@@ -190,7 +190,7 @@ static void grp_update (void)
         * Get the current settings for this group.
         */
        ogrp = gr_locate (group_name);
-       if (!ogrp) {
+       if (NULL == ogrp) {
                fprintf (stderr,
                         _("%s: group '%s' does not exist in %s\n"),
                         Prog, group_name, gr_dbname ());
@@ -231,13 +231,12 @@ static void grp_update (void)
                         Prog, grp.gr_name, gr_dbname ());
                exit (E_GRP_UPDATE);
        }
-#ifdef SHADOWGRP
 
+#ifdef SHADOWGRP
        /*
         * Make sure there was a shadow entry to begin with.
         */
-       if (   (NULL != osgrp)
-           && (pflg || nflg)) {
+       if (NULL != osgrp) {
                /*
                 * Write out the new shadow group entries as well.
                 */