From: Kurt Zeilenga Date: Sat, 30 Oct 1999 03:30:10 +0000 (+0000) Subject: Use uint32 not u_int as code requires 32 bit unsigned integers. X-Git-Tag: UCDATA_2_4~273 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ebc4a8f1497781cf87a7895f0cdcee1a071c05c8;p=openldap Use uint32 not u_int as code requires 32 bit unsigned integers. --- diff --git a/libraries/liblutil/sha1.c b/libraries/liblutil/sha1.c index f8c38a1a66..a7670f93d8 100644 --- a/libraries/liblutil/sha1.c +++ b/libraries/liblutil/sha1.c @@ -20,6 +20,9 @@ * 34AA973C D4C4DAA4 F61EEB2B DBAD2731 6534016F */ +/* + * This code assumes uint32 is 32 bits and char is 8 bits + */ #include "portable.h" #include @@ -67,13 +70,11 @@ lutil_SHA1Transform( uint32 *state, const unsigned char *buffer ) { uint32 a, b, c, d, e; - /* Assumes u_int is 32 bits and char 8 bits. - * I don't know why uint32 isn't used (or what the difference is). */ #ifdef SHA1HANDSOFF - u_int block[16]; + uint32 block[16]; (void)memcpy(block, buffer, 64); #else - u_int *block = (u_int *)buffer; + uint32 *block = (u_int32 *) buffer; #endif /* Copy context->state[] to working vars */