* src/expiry.c: Ignore return value of setlocale(),

bindtextdomain(), and textdomain().
	* src/expiry.c: Add brackets and parenthesis.
	* src/expiry.c: Avoid assignments in comparisons.
	* src/expiry.c: Avoid implicit conversion of pointers to booleans.
This commit is contained in:
nekral-guest 2008-06-09 20:36:24 +00:00
parent e43c3aed67
commit 2b92b0f305
2 changed files with 18 additions and 5 deletions

View File

@ -1,3 +1,11 @@
2008-06-09 Nicolas François <nicolas.francois@centraliens.net>
* src/expiry.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/expiry.c: Add brackets and parenthesis.
* src/expiry.c: Avoid assignments in comparisons.
* src/expiry.c: Avoid implicit conversion of pointers to booleans.
2008-06-09 Nicolas François <nicolas.francois@centraliens.net> 2008-06-09 Nicolas François <nicolas.francois@centraliens.net>
* src/pwunconv.c: Use a bool when possible instead of int * src/pwunconv.c: Use a bool when possible instead of int

View File

@ -90,17 +90,21 @@ int main (int argc, char **argv)
* expiry takes one of two arguments. The default action is to give * expiry takes one of two arguments. The default action is to give
* the usage message. * the usage message.
*/ */
setlocale (LC_ALL, ""); (void) setlocale (LC_ALL, "");
bindtextdomain (PACKAGE, LOCALEDIR); (void) bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE); (void) textdomain (PACKAGE);
if (argc != 2 || (strcmp (argv[1], "-f") && strcmp (argv[1], "-c"))) if ( (argc != 2)
|| ( (strcmp (argv[1], "-f") != 0)
&& (strcmp (argv[1], "-c") != 0))) {
usage (); usage ();
}
/* /*
* Get user entries for /etc/passwd and /etc/shadow * Get user entries for /etc/passwd and /etc/shadow
*/ */
if (!(pwd = get_my_pwent ())) { pwd = get_my_pwent ();
if (NULL == pwd) {
fprintf (stderr, _("%s: unknown user\n"), Prog); fprintf (stderr, _("%s: unknown user\n"), Prog);
exit (10); exit (10);
} }
@ -142,3 +146,4 @@ int main (int argc, char **argv)
usage (); usage ();
exit (1); exit (1);
} }