]> granicus.if.org Git - shadow/commitdiff
* src/groupmems.c: Move the declaration of option_index and
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 9 Jun 2008 20:09:38 +0000 (20:09 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Mon, 9 Jun 2008 20:09:38 +0000 (20:09 +0000)
long_options before the blocks of code.
* src/groupmems.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/groupmems.c: Ignore the return value of pam_end() before
exiting.

ChangeLog
src/groupmems.c

index b65435e4f8678deb92587d010bcde0f5899e613d..ff8b946c7160a0d72129050eb474e21fb2b683ba 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-06-09  Nicolas François  <nicolas.francois@centraliens.net>
+
+       * src/groupmems.c: Move the declaration of option_index and
+       long_options before the blocks of code.
+       * src/groupmems.c: Ignore return value of setlocale(),
+       bindtextdomain(), and textdomain().
+       * src/groupmems.c: Ignore the return value of pam_end() before
+       exiting.
+
 2008-06-09  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/chfn.c: Use a bool when possible instead of int integers.
index 5b9839097905c0b42c87f40d0c5a83e584c414f6..5cfb6d006574cd126c2efaca04640c6e6e25b36d 100644 (file)
@@ -177,10 +177,6 @@ int main (int argc, char **argv)
        int retval;
 #endif
 
-       setlocale (LC_ALL, "");
-       bindtextdomain (PACKAGE, LOCALEDIR);
-       textdomain (PACKAGE);
-
        int option_index = 0;
        static struct option long_options[] = {
                {"add", required_argument, NULL, 'a'},
@@ -191,6 +187,10 @@ int main (int argc, char **argv)
                {NULL, 0, NULL, '\0'}
        };
 
+       (void) setlocale (LC_ALL, "");
+       (void) bindtextdomain (PACKAGE, LOCALEDIR);
+       (void) textdomain (PACKAGE);
+
        while ((arg =
                getopt_long (argc, argv, "a:d:g:lp", long_options,
                             &option_index)) != EOF) {
@@ -255,14 +255,14 @@ int main (int argc, char **argv)
        if (retval == PAM_SUCCESS) {
                retval = pam_authenticate (pamh, 0);
                if (retval != PAM_SUCCESS) {
-                       pam_end (pamh, retval);
+                       (void) pam_end (pamh, retval);
                }
        }
 
        if (retval == PAM_SUCCESS) {
                retval = pam_acct_mgmt (pamh, 0);
                if (retval != PAM_SUCCESS) {
-                       pam_end (pamh, retval);
+                       (void) pam_end (pamh, retval);
                }
        }
 
@@ -306,7 +306,7 @@ int main (int argc, char **argv)
 
 #ifdef USE_PAM
        if (retval == PAM_SUCCESS) {
-               pam_end (pamh, PAM_SUCCESS);
+               (void) pam_end (pamh, PAM_SUCCESS);
        }
 #endif                         /* USE_PAM */
        exit (EXIT_SUCCESS);