[Pkg-shadow-commits] r3059 - in upstream/trunk: . src

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sat Sep 5 22:31:29 UTC 2009


Author: nekral-guest
Date: 2009-09-05 22:31:29 +0000 (Sat, 05 Sep 2009)
New Revision: 3059

Modified:
   upstream/trunk/ChangeLog
   upstream/trunk/src/chage.c
   upstream/trunk/src/chgpasswd.c
   upstream/trunk/src/chpasswd.c
   upstream/trunk/src/chsh.c
   upstream/trunk/src/faillog.c
   upstream/trunk/src/gpasswd.c
   upstream/trunk/src/groupadd.c
   upstream/trunk/src/groupmems.c
   upstream/trunk/src/groupmod.c
   upstream/trunk/src/lastlog.c
   upstream/trunk/src/newusers.c
   upstream/trunk/src/passwd.c
   upstream/trunk/src/su.c
   upstream/trunk/src/useradd.c
   upstream/trunk/src/userdel.c
   upstream/trunk/src/usermod.c
   upstream/trunk/src/vipw.c
Log:
	* src/userdel.c, src/lastlog.c, src/gpasswd.c, src/newusers.c,
	src/chpasswd.c, src/groupmems.c, src/usermod.c, src/chgpasswd.c,
	src/vipw.c, src/su.c, src/useradd.c, src/groupmod.c, src/passwd.c,
	src/groupadd.c, src/chage.c, src/faillog.c, src/chsh.c: Use
	booleans for tests.
	* src/userdel.c, src/gpasswd.c, src/groupmems.c, src/usermod.c,
	src/groupmod.c, src/passwd.c: Use a break even after usage().


Modified: upstream/trunk/ChangeLog
===================================================================
--- upstream/trunk/ChangeLog	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/ChangeLog	2009-09-05 22:31:29 UTC (rev 3059)
@@ -1,3 +1,13 @@
+2009-09-06  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* src/userdel.c, src/lastlog.c, src/gpasswd.c, src/newusers.c,
+	src/chpasswd.c, src/groupmems.c, src/usermod.c, src/chgpasswd.c,
+	src/vipw.c, src/su.c, src/useradd.c, src/groupmod.c, src/passwd.c,
+	src/groupadd.c, src/chage.c, src/faillog.c, src/chsh.c: Use
+	booleans for tests.
+	* src/userdel.c, src/gpasswd.c, src/groupmems.c, src/usermod.c,
+	src/groupmod.c, src/passwd.c: Use a break even after usage().
+
 2009-09-05  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* src/gpasswd.c, src/groupmems.c: Split the groupmems and gpasswd

Modified: upstream/trunk/src/chage.c
===================================================================
--- upstream/trunk/src/chage.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/chage.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -168,7 +168,7 @@
 	         "  -M, --maxdays MAX_DAYS        set maximim number of days before password\n"
 	         "                                change to MAX_DAYS\n"
 	         "  -W, --warndays WARN_DAYS      set expiration warning days to WARN_DAYS\n"
-	         "\n"), status ? stderr : stdout);
+	         "\n"), (E_SUCCESS != status) ? stderr : stdout);
 	exit (status);
 }
 

Modified: upstream/trunk/src/chgpasswd.c
===================================================================
--- upstream/trunk/src/chgpasswd.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/chgpasswd.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -116,7 +116,7 @@
  */
 static void usage (int status)
 {
-	fprintf (status ? stderr : stdout,
+	(void) fprintf ((E_SUCCESS != status) ? stderr : stdout,
 	                 _("Usage: %s [options]\n"
 	                   "\n"
 	                   "Options:\n"

Modified: upstream/trunk/src/chpasswd.c
===================================================================
--- upstream/trunk/src/chpasswd.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/chpasswd.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -114,7 +114,7 @@
  */
 static void usage (int status)
 {
-	FILE *usageout = status ? stderr : stdout;
+	FILE *usageout = (E_SUCCESS != status) ? stderr : stdout;
 	(void) fprintf (usageout,
 	                _("Usage: %s [options]\n"
 	                  "\n"

Modified: upstream/trunk/src/chsh.c
===================================================================
--- upstream/trunk/src/chsh.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/chsh.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -108,7 +108,7 @@
 	         "Options:\n"
 	         "  -h, --help                    display this help message and exit\n"
 	         "  -s, --shell SHELL             new login shell for the user account\n"
-	         "\n"), status ? stderr : stdout);
+	         "\n"), (E_SUCCESS != status) ? stderr : stdout);
 	exit (status);
 }
 

Modified: upstream/trunk/src/faillog.c
===================================================================
--- upstream/trunk/src/faillog.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/faillog.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -82,7 +82,7 @@
 
 static void usage (int status)
 {
-	FILE *usageout = status ? stderr : stdout;
+	FILE *usageout = (E_SUCCESS != status) ? stderr : stdout;
 	(void) fprintf (usageout,
 	                _("Usage: %s [options]\n"
 	                  "\n"

Modified: upstream/trunk/src/gpasswd.c
===================================================================
--- upstream/trunk/src/gpasswd.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/gpasswd.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -130,7 +130,7 @@
  */
 static void usage (int status)
 {
-	FILE *usageout = status ? stderr : stdout;
+	FILE *usageout = (E_SUCCESS != status) ? stderr : stdout;
 	(void) fprintf (usageout,
 	                _("Usage: %s [option] GROUP\n"
 	                  "\n"
@@ -278,6 +278,7 @@
 			break;
 		case 'h':
 			usage (E_SUCCESS);
+			break;
 		case 'M':	/* set the list of members */
 			members = optarg;
 			if (!is_valid_user_list (members)) {

Modified: upstream/trunk/src/groupadd.c
===================================================================
--- upstream/trunk/src/groupadd.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/groupadd.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -107,7 +107,7 @@
  */
 static void usage (int status)
 {
-	FILE *usageout = status ? stderr : stdout;
+	FILE *usageout = (E_SUCCESS != status) ? stderr : stdout;
 	(void) fprintf (usageout,
 	                _("Usage: %s [options] GROUP\n"
 	                  "\n"

Modified: upstream/trunk/src/groupmems.c
===================================================================
--- upstream/trunk/src/groupmems.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/groupmems.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -363,7 +363,7 @@
 
 static void usage (int status)
 {
-	FILE *usageout = status ? stderr : stdout;
+	FILE *usageout = (EXIT_SUCCESS != status) ? stderr : stdout;
 	(void) fprintf (usageout,
 	                _("Usage: %s [options] [action]\n"
 	                  "\n"
@@ -414,6 +414,7 @@
 			break;
 		case 'h':
 			usage (EXIT_SUCCESS);
+			break;
 		case 'l':
 			list = true;
 			++exclusive;

Modified: upstream/trunk/src/groupmod.c
===================================================================
--- upstream/trunk/src/groupmod.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/groupmod.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -115,7 +115,7 @@
 
 static void usage (int status)
 {
-	FILE *usageout = status ? stderr : stdout;
+	FILE *usageout = (E_SUCCESS != status) ? stderr : stdout;
 	(void) fprintf (usageout,
 	                _("Usage: %s [options] GROUP\n"
 	                  "\n"
@@ -365,6 +365,7 @@
 			break;
 		case 'h':
 			usage (E_SUCCESS);
+			break;
 		case 'n':
 			nflg = true;
 			group_newname = optarg;

Modified: upstream/trunk/src/lastlog.c
===================================================================
--- upstream/trunk/src/lastlog.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/lastlog.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -80,7 +80,7 @@
 	         "  -h, --help                    display this help message and exit\n"
 	         "  -t, --time DAYS               print only lastlog records more recent than DAYS\n"
 	         "  -u, --user LOGIN              print lastlog record of the specified LOGIN\n"
-	         "\n"), status ? stderr : stdout);
+	         "\n"), (EXIT_SUCCESS != status) ? stderr : stdout);
 	exit (status);
 }
 

Modified: upstream/trunk/src/newusers.c
===================================================================
--- upstream/trunk/src/newusers.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/newusers.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -112,7 +112,7 @@
  */
 static void usage (int status)
 {
-	FILE *usageout = status ? stderr : stdout;
+	FILE *usageout = (EXIT_SUCCESS != status) ? stderr : stdout;
 	(void) fprintf (usageout,
 	                _("Usage: %s [options]\n"
 	                  "\n"

Modified: upstream/trunk/src/passwd.c
===================================================================
--- upstream/trunk/src/passwd.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/passwd.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -180,7 +180,7 @@
 	         "  -w, --warndays WARN_DAYS      set expiration warning days to WARN_DAYS\n"
 	         "  -x, --maxdays MAX_DAYS        set maximum number of days before password\n"
 	         "                                change to MAX_DAYS\n"
-	         "\n"), status ? stderr : stdout);
+	         "\n"), (E_SUCCESS != status) ? stderr : stdout);
 	exit (status);
 }
 
@@ -899,6 +899,7 @@
 				break;
 			case 'h':
 				usage (E_SUCCESS);
+				break;
 			default:
 				usage (E_BAD_ARG);
 			}

Modified: upstream/trunk/src/su.c
===================================================================
--- upstream/trunk/src/su.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/su.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -335,7 +335,7 @@
 	         "  --preserve-environment        do not reset environment variables, and\n"
 	         "                                keep the same shell\n"
 	         "  -s, --shell SHELL             use SHELL instead of the default in passwd\n"
-	         "\n"), status ? stderr : stdout);
+	         "\n"), (E_SUCCESS != status) ? stderr : stdout);
 	exit (status);
 }
 

Modified: upstream/trunk/src/useradd.c
===================================================================
--- upstream/trunk/src/useradd.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/useradd.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -683,7 +683,7 @@
  */
 static void usage (int status)
 {
-	FILE *usageout = status ? stderr : stdout;
+	FILE *usageout = (E_SUCCESS != status) ? stderr : stdout;
 	(void) fprintf (usageout,
 	                _("Usage: %s [options] LOGIN\n"
 	                  "\n"

Modified: upstream/trunk/src/userdel.c
===================================================================
--- upstream/trunk/src/userdel.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/userdel.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -120,7 +120,7 @@
 	         "                                even if not owned by user\n"
 	         "  -h, --help                    display this help message and exit\n"
 	         "  -r, --remove                  remove home directory and mail spool\n"
-	         "\n"), status ? stderr : stdout);
+	         "\n"), (E_SUCCESS != status) ? stderr : stdout);
 	exit (status);
 }
 
@@ -776,6 +776,7 @@
 				break;
 			case 'h':
 				usage (E_SUCCESS);
+				break;
 			case 'r':	/* remove home dir and mailbox */
 				rflg = true;
 				break;

Modified: upstream/trunk/src/usermod.c
===================================================================
--- upstream/trunk/src/usermod.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/usermod.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -302,7 +302,7 @@
  */
 static void usage (int status)
 {
-	fprintf (status ? stderr : stdout,
+	fprintf ((E_SUCCESS != status) ? stderr : stdout,
 	         _("Usage: usermod [options] LOGIN\n"
 	         "\n"
 	         "Options:\n"
@@ -978,6 +978,7 @@
 				break;
 			case 'h':
 				usage (E_SUCCESS);
+				break;
 			case 'l':
 				if (!is_valid_user_name (optarg)) {
 					fprintf (stderr,

Modified: upstream/trunk/src/vipw.c
===================================================================
--- upstream/trunk/src/vipw.c	2009-09-05 20:50:24 UTC (rev 3058)
+++ upstream/trunk/src/vipw.c	2009-09-05 22:31:29 UTC (rev 3059)
@@ -83,7 +83,7 @@
 	         "  -p, --passwd                  edit passwd database\n"
 	         "  -q, --quiet                   quiet mode\n"
 	         "  -s, --shadow                  edit shadow or gshadow database\n"
-	         "\n"), status ? stderr : stdout);
+	         "\n"), (E_SUCCESS != status) ? stderr : stdout);
 	exit (status);
 }
 




More information about the Pkg-shadow-commits mailing list