From: Jelte Jansen Date: Fri, 22 May 2009 19:01:33 +0000 (+0000) Subject: s/u_int32_t/uint32_t/g X-Git-Tag: release-1.6.0~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dcd4a9e5ffc955b343552247c30e35fa0d33de31;p=thirdparty%2Fldns.git s/u_int32_t/uint32_t/g --- diff --git a/ldns/sha1.h b/ldns/sha1.h index e443ce69..ca2456e2 100644 --- a/ldns/sha1.h +++ b/ldns/sha1.h @@ -5,13 +5,13 @@ #define LDNS_SHA1_DIGEST_LENGTH 20 typedef struct { - u_int32_t state[5]; - u_int64_t count; + uint32_t state[5]; + uint64_t count; unsigned char buffer[LDNS_SHA1_BLOCK_LENGTH]; } ldns_sha1_ctx; void ldns_sha1_init(ldns_sha1_ctx * context); -void ldns_sha1_transform(u_int32_t state[5], const unsigned char buffer[LDNS_SHA1_BLOCK_LENGTH]); +void ldns_sha1_transform(uint32_t state[5], const unsigned char buffer[LDNS_SHA1_BLOCK_LENGTH]); void ldns_sha1_update(ldns_sha1_ctx *context, const unsigned char *data, unsigned int len); void ldns_sha1_final(unsigned char digest[LDNS_SHA1_DIGEST_LENGTH], ldns_sha1_ctx *context); diff --git a/sha1.c b/sha1.c index 3f7b62b0..fcc3e045 100644 --- a/sha1.c +++ b/sha1.c @@ -43,9 +43,9 @@ /* Hash a single 512-bit block. This is the core of the algorithm. */ void -ldns_sha1_transform(u_int32_t state[5], const unsigned char buffer[LDNS_SHA1_BLOCK_LENGTH]) +ldns_sha1_transform(uint32_t state[5], const unsigned char buffer[LDNS_SHA1_BLOCK_LENGTH]) { - u_int32_t a, b, c, d, e; + uint32_t a, b, c, d, e; typedef union { unsigned char c[64]; unsigned int l[16]; @@ -122,7 +122,7 @@ ldns_sha1_update(ldns_sha1_ctx *context, const unsigned char *data, unsigned int unsigned int i; unsigned int j; - j = (u_int32_t)((context->count >> 3) & 63); + j = (uint32_t)((context->count >> 3) & 63); context->count += (len << 3); if ((j + len) > 63) { bcopy(data, &context->buffer[j], (i = 64 - j));