From fdf1d34fdc53bb28625669ead2b812f6dcb47337 Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Sat, 18 May 2013 18:17:38 -0300 Subject: Some type conversion warnings fixed. If this breaks anything create a bug report ASAP and I will revert it gladly. Signed-off-by: Matheus Macabu --- src/common/des.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/common/des.c') diff --git a/src/common/des.c b/src/common/des.c index 917fc33e0..ed6d098dc 100644 --- a/src/common/des.c +++ b/src/common/des.c @@ -78,8 +78,8 @@ static void E(BIT64* src) { BIT64 tmp = {{0}}; -if( false ) -{// original +#if 0 + // original static const uint8_t expand_table[48] = { 32, 1, 2, 3, 4, 5, 4, 5, 6, 7, 8, 9, @@ -98,9 +98,8 @@ if( false ) if( src->b[j / 8 + 4] & mask[j % 8] ) tmp .b[i / 6 + 0] |= mask[i % 6]; } -} -else -{// optimized +#endif + // optimized tmp.b[0] = ((src->b[7]<<5) | (src->b[4]>>3)) & 0x3f; // ..0 vutsr tmp.b[1] = ((src->b[4]<<1) | (src->b[5]>>7)) & 0x3f; // ..srqpo n tmp.b[2] = ((src->b[4]<<5) | (src->b[5]>>3)) & 0x3f; // ..o nmlkj @@ -109,7 +108,6 @@ else tmp.b[5] = ((src->b[6]<<1) | (src->b[7]>>7)) & 0x3f; // ..cba98 7 tmp.b[6] = ((src->b[6]<<5) | (src->b[7]>>3)) & 0x3f; // ..8 76543 tmp.b[7] = ((src->b[7]<<1) | (src->b[4]>>7)) & 0x3f; // ..43210 v -} *src = tmp; } -- cgit v1.2.3-60-g2f50