]> granicus.if.org Git - shadow/commitdiff
* src/grpck.c: Ignore puts return value.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 23 Apr 2009 11:21:57 +0000 (11:21 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 23 Apr 2009 11:21:57 +0000 (11:21 +0000)
* src/grpck.c: Avoid variable format string.

ChangeLog
src/grpck.c

index afd9522ea23358c233005c0d5d0444fedb5817ce..ac97e930978129d19af30792adeca3a5e2b66355 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-04-22  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/grpck.c: Ignore puts return value.
+       * src/grpck.c: Avoid variable format string.
+
 2009-04-22  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/lastlog.c: Use EXIT_FAILURE / EXIT_SUCCESS for exit()
index 92897d137e1363f5d3da6a0fae53405f0a93052c..cdc4252693597d5b2f301dc2af97ea86be89abb8 100644 (file)
@@ -467,7 +467,7 @@ static void check_grp_file (int *errors, bool *changed)
                         * Tell the user this entire line is bogus and ask
                         * them to delete it.
                         */
-                       puts (_("invalid group file entry"));
+                       (void) puts (_("invalid group file entry"));
                        printf (_("delete line '%s'? "), gre->line);
                        *errors += 1;
 
@@ -527,7 +527,7 @@ static void check_grp_file (int *errors, bool *changed)
                         * Tell the user this entry is a duplicate of
                         * another and ask them to delete it.
                         */
-                       puts (_("duplicate group entry"));
+                       (void) puts (_("duplicate group entry"));
                        printf (_("delete line '%s'? "), gre->line);
                        *errors += 1;
 
@@ -660,7 +660,7 @@ static void check_sgr_file (int *errors, bool *changed)
                         * Tell the user this entire line is bogus and ask
                         * them to delete it.
                         */
-                       puts (_("invalid shadow group file entry"));
+                       (void) puts (_("invalid shadow group file entry"));
                        printf (_("delete line '%s'? "), sge->line);
                        *errors += 1;
 
@@ -720,7 +720,7 @@ static void check_sgr_file (int *errors, bool *changed)
                         * Tell the user this entry is a duplicate of
                         * another and ask them to delete it.
                         */
-                       puts (_("duplicate shadow group entry"));
+                       (void) puts (_("duplicate shadow group entry"));
                        printf (_("delete line '%s'? "), sge->line);
                        *errors += 1;
 
@@ -833,9 +833,11 @@ int main (int argc, char **argv)
         * Tell the user what we did and exit.
         */
        if (0 != errors) {
-               printf (changed ?
-                       _("%s: the files have been updated\n") :
-                       _("%s: no changes\n"), Prog);
+               if (changed) {
+                       printf (_("%s: the files have been updated\n"), Prog);
+               } else {
+                       printf (_("%s: no changes\n"), Prog);
+               }
        }
 
        exit ((0 != errors) ? E_BAD_ENTRY : E_OKAY);