svn commit: trunk/uClibc/libcrypt

vda at uclibc.org vda at uclibc.org
Wed Jul 18 22:30:45 UTC 2007


Author: vda
Date: 2007-07-18 15:30:43 -0700 (Wed, 18 Jul 2007)
New Revision: 19161

Log:
des.c: move 0.5k of static data on stack, they are used only temporarily
by des_init.



Modified:
   trunk/uClibc/libcrypt/des.c


Changeset:
Modified: trunk/uClibc/libcrypt/des.c
===================================================================
--- trunk/uClibc/libcrypt/des.c	2007-07-18 22:03:40 UTC (rev 19160)
+++ trunk/uClibc/libcrypt/des.c	2007-07-18 22:30:43 UTC (rev 19161)
@@ -70,7 +70,6 @@
  * struct crypt_data to make this really reentrant... */
 static u_char	inv_key_perm[64];
 static u_char	inv_comp_perm[56];
-static u_char	u_sbox[8][64];
 static u_char	un_pbox[32];
 static u_int32_t en_keysl[16], en_keysr[16];
 static u_int32_t de_keysl[16], de_keysr[16];
@@ -194,7 +193,6 @@
 };
 
 static const u_char	bits8[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01 };
-static const u_int32_t *bits28, *bits24;
 
 
 static int 
@@ -218,12 +216,15 @@
 static void
 des_init(void)
 {
+	static int des_initialised = 0;
+
 	int	i, j, b, k, inbit, obit;
 	u_int32_t	*p, *il, *ir, *fl, *fr;
-	static int des_initialised = 0;
+	const u_int32_t *bits28, *bits24;
+	u_char	u_sbox[8][64];
 
 	if (des_initialised==1)
-	    return;
+		return;
 
 	old_rawkey0 = old_rawkey1 = 0L;
 	saltbits = 0L;




More information about the uClibc-cvs mailing list