1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-07 23:27:48 +02:00

* tiger.c (tiger_final): Removed superfluous toke pasting operators.

* md5.c (md5_final): Ditto.
This commit is contained in:
Werner Koch 2002-04-24 08:04:04 +00:00
parent c55e2bcf46
commit edc627b244
3 changed files with 13 additions and 11 deletions

View File

@ -1,3 +1,8 @@
2002-04-24 Werner Koch <wk@gnupg.org>
* tiger.c (tiger_final): Removed superfluous toke pasting operators.
* md5.c (md5_final): Ditto.
2002-04-22 Stefan Bellon <sbellon@sbellon.de>
* rndriscos.c (func_table): Made func a function pointer.

View File

@ -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);

View File

@ -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);