diff options
author | Rich Salz <rsalz@openssl.org> | 2015-01-24 10:57:19 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-01-24 10:58:38 -0500 |
commit | a2b18e657ea1a932d125154f4e13ab2258796d90 (patch) | |
tree | bdfcb8bbe1d673b3bce209ef289520e11a109464 /crypto/idea | |
parent | 2747d73c1466c487daf64a1234b6fe2e8a62ac75 (diff) |
ifdef cleanup, part 4a: '#ifdef undef'
This removes all code surrounded by '#ifdef undef'
One case is left: memmove() replaced by open-coded for loop,
in crypto/stack/stack.c That needs further review.
Also removed a couple of instances of /* dead code */ if I saw them
while doing the main removal.
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/idea')
-rw-r--r-- | crypto/idea/idea_lcl.h | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/crypto/idea/idea_lcl.h b/crypto/idea/idea_lcl.h index e40695384d..ffb06a146f 100644 --- a/crypto/idea/idea_lcl.h +++ b/crypto/idea/idea_lcl.h @@ -71,18 +71,6 @@ if (ul != 0) \ else \ r=(-(int)a-b+1); /* assuming a or b is 0 and in range */ -#ifdef undef -# define idea_mul(r,a,b,ul,sl) \ -if (a == 0) r=(0x10001-b)&0xffff; \ -else if (b == 0) r=(0x10001-a)&0xffff; \ -else { \ - ul=(unsigned long)a*b; \ - sl=(ul&0xffff)-(ul>>16); \ - if (sl <= 0) sl+=0x10001; \ - r=sl; \ - } -#endif - /* * 7/12/95 - Many thanks to Rhys Weatherley <rweather@us.oracle.com> for * pointing out that I was assuming little endian byte order for all @@ -144,58 +132,6 @@ else { \ #define n2s(c,l) (l =((IDEA_INT)(*((c)++)))<< 8L, \ l|=((IDEA_INT)(*((c)++))) ) -#ifdef undef -/* NOTE - c is not incremented as per c2l */ -# define c2ln(c,l1,l2,n) { \ - c+=n; \ - l1=l2=0; \ - switch (n) { \ - case 8: l2 =((unsigned long)(*(--(c))))<<24; \ - case 7: l2|=((unsigned long)(*(--(c))))<<16; \ - case 6: l2|=((unsigned long)(*(--(c))))<< 8; \ - case 5: l2|=((unsigned long)(*(--(c)))); \ - case 4: l1 =((unsigned long)(*(--(c))))<<24; \ - case 3: l1|=((unsigned long)(*(--(c))))<<16; \ - case 2: l1|=((unsigned long)(*(--(c))))<< 8; \ - case 1: l1|=((unsigned long)(*(--(c)))); \ - } \ - } - -/* NOTE - c is not incremented as per l2c */ -# define l2cn(l1,l2,c,n) { \ - c+=n; \ - switch (n) { \ - case 8: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \ - case 7: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \ - case 6: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \ - case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \ - case 4: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \ - case 3: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \ - case 2: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \ - case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \ - } \ - } - -# undef c2s -# define c2s(c,l) (l =((unsigned long)(*((c)++))) , \ - l|=((unsigned long)(*((c)++)))<< 8L) - -# undef s2c -# define s2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ - *((c)++)=(unsigned char)(((l)>> 8L)&0xff)) - -# undef c2l -# define c2l(c,l) (l =((unsigned long)(*((c)++))) , \ - l|=((unsigned long)(*((c)++)))<< 8L, \ - l|=((unsigned long)(*((c)++)))<<16L, \ - l|=((unsigned long)(*((c)++)))<<24L) - -# undef l2c -# define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ - *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ - *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ - *((c)++)=(unsigned char)(((l)>>24L)&0xff)) -#endif #define E_IDEA(num) \ x1&=0xffff; \ |