svn commit: trunk/uClibc/libcrypt

vda at uclibc.org vda at uclibc.org
Fri Jun 13 15:19:32 UTC 2008


Author: vda
Date: 2008-06-13 08:19:32 -0700 (Fri, 13 Jun 2008)
New Revision: 22328

Log:
des: des_setkey always returns 0, there is no point
in checking whether it returns 1.

    text           data     bss     dec     hex filename
-   4283              0   70209   74492   122fc libcrypt/des.o
+   4273              0   70209   74482   122f2 libcrypt/des.o



Modified:
   trunk/uClibc/libcrypt/des.c


Changeset:
Modified: trunk/uClibc/libcrypt/des.c
===================================================================
--- trunk/uClibc/libcrypt/des.c	2008-06-13 15:13:41 UTC (rev 22327)
+++ trunk/uClibc/libcrypt/des.c	2008-06-13 15:19:32 UTC (rev 22328)
@@ -372,7 +372,7 @@
 }
 
 
-static int
+static void
 des_setkey(const char *key)
 {
 	u_int32_t	k0, k1, rawkey0, rawkey1;
@@ -392,7 +392,7 @@
 		 * has bad parity anyway) in order to simplify the starting
 		 * conditions.
 		 */
-		return(0);
+		return;
 	}
 	old_rawkey0 = rawkey0;
 	old_rawkey1 = rawkey1;
@@ -448,7 +448,6 @@
 				| comp_maskr[6][(t1 >> 7) & 0x7f]
 				| comp_maskr[7][t1 & 0x7f];
 	}
-	return(0);
 }
 
 
@@ -658,8 +657,7 @@
 		if (*(q - 1))
 			key++;
 	}
-	if (des_setkey((char *)keybuf))
-		return(NULL);
+	des_setkey((char *)keybuf);
 
 #if 0
 	if (*setting == _PASSWORD_EFMT1) {
@@ -688,8 +686,7 @@
 			while (q - (u_char *)keybuf - 8 && *key)
 				*q++ ^= *key++ << 1;
 
-			if (des_setkey((char *)keybuf))
-				return(NULL);
+			des_setkey((char *)keybuf);
 		}
 		strncpy(output, setting, 9);
 




More information about the uClibc-cvs mailing list