svn commit: trunk/busybox/loginutils

vda at busybox.net vda at busybox.net
Thu Nov 30 23:13:59 UTC 2006


Author: vda
Date: 2006-11-30 15:13:59 -0800 (Thu, 30 Nov 2006)
New Revision: 16744

Log:
passwd: micro-optimization


Modified:
   trunk/busybox/loginutils/passwd.c


Changeset:
Modified: trunk/busybox/loginutils/passwd.c
===================================================================
--- trunk/busybox/loginutils/passwd.c	2006-11-30 22:40:32 UTC (rev 16743)
+++ trunk/busybox/loginutils/passwd.c	2006-11-30 23:13:59 UTC (rev 16744)
@@ -252,7 +252,7 @@
 		OPT_delete = 0x8, /* -d - delete password */
 		OPT_lud = 0xe,
 		STATE_ALGO_md5 = 0x10,
-		STATE_ALGO_des = 0x20,
+		/*STATE_ALGO_des = 0x20, not yet needed */
 	};
 	unsigned opt;
 	char *opt_a = "";
@@ -269,10 +269,10 @@
 	argc -= optind;
 	argv += optind;
 
-	if (strcasecmp(opt_a, "des") == 0) /* -a */
-		opt |= STATE_ALGO_des;
-	else
+	if (strcasecmp(opt_a, "des") != 0) /* -a */
 		opt |= STATE_ALGO_md5;
+	//else
+	//	opt |= STATE_ALGO_des;
 	myuid = getuid();
 	if ((opt & OPT_lud) && (!argc || myuid))
 		bb_show_usage();




More information about the busybox-cvs mailing list