[Pkg-shadow-commits] r2092 - in upstream/trunk: . src
nekral-guest at alioth.debian.org
nekral-guest at alioth.debian.org
Mon Jun 9 20:56:04 UTC 2008
Author: nekral-guest
Date: 2008-06-09 20:56:03 +0000 (Mon, 09 Jun 2008)
New Revision: 2092
Modified:
upstream/trunk/ChangeLog
upstream/trunk/src/chgpasswd.c
Log:
* src/chgpasswd.c: Use a bool when possible instead of int
integers.
* src/chgpasswd.c: Ignore return value of setlocale(),
bindtextdomain(), and textdomain().
* src/chgpasswd.c: Avoid implicit conversion of integers to
booleans.
Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog 2008-06-09 20:54:04 UTC (rev 2091)
+++ upstream/trunk/ChangeLog 2008-06-09 20:56:03 UTC (rev 2092)
@@ -1,5 +1,14 @@
2008-06-09 Nicolas François <nicolas.francois at centraliens.net>
+ * src/chgpasswd.c: Use a bool when possible instead of int
+ integers.
+ * src/chgpasswd.c: Ignore return value of setlocale(),
+ bindtextdomain(), and textdomain().
+ * src/chgpasswd.c: Avoid implicit conversion of integers to
+ booleans.
+
+2008-06-09 Nicolas François <nicolas.francois at centraliens.net>
+
* src/groupdel.c: Use a bool when possible instead of int
integers.
* src/groupdel.c: Avoid implicit conversion of pointers / integers to
Modified: upstream/trunk/src/chgpasswd.c
===================================================================
--- upstream/trunk/src/chgpasswd.c 2008-06-09 20:54:04 UTC (rev 2091)
+++ upstream/trunk/src/chgpasswd.c 2008-06-09 20:56:03 UTC (rev 2092)
@@ -53,16 +53,16 @@
* Global variables
*/
static char *Prog;
-static int cflg = 0;
-static int eflg = 0;
-static int md5flg = 0;
-static int sflg = 0;
+static bool cflg = false;
+static bool eflg = false;
+static bool md5flg = false;
+static bool sflg = false;
static const char *crypt_method = NULL;
static long sha_rounds = 5000;
#ifdef SHADOWGRP
-static int is_shadow_grp;
+static bool is_shadow_grp;
#endif
#ifdef USE_PAM
@@ -133,22 +133,22 @@
long_options, &option_index)) != -1) {
switch (c) {
case 'c':
- cflg = 1;
+ cflg = true;
crypt_method = optarg;
break;
case 'e':
- eflg = 1;
+ eflg = true;
break;
case 'h':
usage ();
break;
case 'm':
- md5flg = 1;
+ md5flg = true;
break;
#ifdef USE_SHA_CRYPT
case 's':
- sflg = 1;
- if (!getlong(optarg, &sha_rounds)) {
+ sflg = true;
+ if (getlong(optarg, &sha_rounds) != 0) {
fprintf (stderr,
_("%s: invalid numeric argument '%s'\n"),
Prog, optarg);
@@ -337,9 +337,9 @@
Prog = Basename (argv[0]);
- setlocale (LC_ALL, "");
- bindtextdomain (PACKAGE, LOCALEDIR);
- textdomain (PACKAGE);
+ (void) setlocale (LC_ALL, "");
+ (void) bindtextdomain (PACKAGE, LOCALEDIR);
+ (void) textdomain (PACKAGE);
process_flags(argc, argv);
@@ -456,7 +456,7 @@
ok = gr_update (&newgr);
}
- if (!ok) {
+ if (0 == ok) {
fprintf (stderr,
_
("%s: line %d: cannot update group entry\n"),
@@ -473,7 +473,7 @@
* changes to be written out all at once, and then unlocked
* afterwards.
*/
- if (errors) {
+ if (0 != errors) {
fprintf (stderr,
_("%s: error detected, changes ignored\n"), Prog);
#ifdef SHADOWGRP
More information about the Pkg-shadow-commits
mailing list