From edc627b2441345d5aa4ce108064b94bb0a174784 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 24 Apr 2002 08:04:04 +0000 Subject: [PATCH] * tiger.c (tiger_final): Removed superfluous toke pasting operators. * md5.c (md5_final): Ditto. --- cipher/ChangeLog | 5 +++++ cipher/md5.c | 9 +++------ cipher/tiger.c | 10 +++++----- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cipher/ChangeLog b/cipher/ChangeLog index e12853cd7..8e28db04c 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,8 @@ +2002-04-24 Werner Koch + + * tiger.c (tiger_final): Removed superfluous toke pasting operators. + * md5.c (md5_final): Ditto. + 2002-04-22 Stefan Bellon * rndriscos.c (func_table): Made func a function pointer. diff --git a/cipher/md5.c b/cipher/md5.c index 6e27c7205..ef6886eb4 100644 --- a/cipher/md5.c +++ b/cipher/md5.c @@ -312,13 +312,10 @@ md5_final( MD5_CONTEXT *hd ) p = hd->buf; #ifdef BIG_ENDIAN_HOST - #define X(a) do { *p++ = hd->##a ; *p++ = hd->##a >> 8; \ - *p++ = hd->##a >> 16; *p++ = hd->##a >> 24; } while(0) + #define X(a) do { *p++ = hd-> a ; *p++ = hd-> a >> 8; \ + *p++ = hd-> a >> 16; *p++ = hd-> a >> 24; } while(0) #else /* little endian */ - /*#define X(a) do { *(u32*)p = hd->##a ; p += 4; } while(0)*/ - /* Unixware's cpp doesn't like the above construct so we do it his way: - * (reported by Allan Clark) */ - #define X(a) do { *(u32*)p = (*hd).a ; p += 4; } while(0) + #define X(a) do { *(u32*)p = hd-> a ; p += 4; } while(0) #endif X(A); X(B); diff --git a/cipher/tiger.c b/cipher/tiger.c index 4da0f64e4..6da715d48 100644 --- a/cipher/tiger.c +++ b/cipher/tiger.c @@ -860,12 +860,12 @@ tiger_final( TIGER_CONTEXT *hd ) p = hd->buf; #ifdef BIG_ENDIAN_HOST - #define X(a) do { *(u64*)p = hd->##a ; p += 8; } while(0) + #define X(a) do { *(u64*)p = hd-> a ; p += 8; } while(0) #else /* little endian */ - #define X(a) do { *p++ = hd->##a >> 56; *p++ = hd->##a >> 48; \ - *p++ = hd->##a >> 40; *p++ = hd->##a >> 32; \ - *p++ = hd->##a >> 24; *p++ = hd->##a >> 16; \ - *p++ = hd->##a >> 8; *p++ = hd->##a; } while(0) + #define X(a) do { *p++ = hd-> a >> 56; *p++ = hd-> a >> 48; \ + *p++ = hd-> a >> 40; *p++ = hd-> a >> 32; \ + *p++ = hd-> a >> 24; *p++ = hd-> a >> 16; \ + *p++ = hd-> a >> 8; *p++ = hd-> a; } while(0) #endif X(a); X(b);