[Pkg-shadow-commits] r2257 - upstream/trunk/src

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sat Aug 9 23:25:50 UTC 2008


Author: nekral-guest
Date: 2008-08-09 23:25:49 +0000 (Sat, 09 Aug 2008)
New Revision: 2257

Modified:
   upstream/trunk/src/chgpasswd.c
Log:
Improve commonalities between chgpasswd and chpasswd.

Modified: upstream/trunk/src/chgpasswd.c
===================================================================
--- upstream/trunk/src/chgpasswd.c	2008-08-09 23:25:18 UTC (rev 2256)
+++ upstream/trunk/src/chgpasswd.c	2008-08-09 23:25:49 UTC (rev 2257)
@@ -130,7 +130,7 @@
 	                   "                                crypt algorithms\n")
 #endif
 	                 );
-	exit (1);
+	exit (E_USAGE);
 }
 
 /*
@@ -221,12 +221,12 @@
 	}
 
 	if (cflg) {
-		if (   0 != strcmp (crypt_method, "DES")
-		    && 0 != strcmp (crypt_method, "MD5")
-		    && 0 != strcmp (crypt_method, "NONE")
+		if (   (0 != strcmp (crypt_method, "DES"))
+		    && (0 != strcmp (crypt_method, "MD5"))
+		    && (0 != strcmp (crypt_method, "NONE"))
 #ifdef USE_SHA_CRYPT
-		    && 0 != strcmp (crypt_method, "SHA256")
-		    && 0 != strcmp (crypt_method, "SHA512")
+		    && (0 != strcmp (crypt_method, "SHA256"))
+		    && (0 != strcmp (crypt_method, "SHA512"))
 #endif
 		    ) {
 			fprintf (stderr,
@@ -379,7 +379,7 @@
 	(void) bindtextdomain (PACKAGE, LOCALEDIR);
 	(void) textdomain (PACKAGE);
 
-	process_flags(argc, argv);
+	process_flags (argc, argv);
 
 	OPENLOG ("chgpasswd");
 
@@ -498,8 +498,7 @@
 
 		if (0 == ok) {
 			fprintf (stderr,
-			         _
-			         ("%s: line %d: cannot update group entry\n"),
+			         _("%s: line %d: cannot update group entry\n"),
 			         Prog, line);
 			errors++;
 			continue;




More information about the Pkg-shadow-commits mailing list