* 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.
This commit is contained in:
parent
3879f07fa8
commit
d48973bbc8
@ -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.
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user