diff options
author | David Benjamin <davidben@chromium.org> | 2015-12-07 21:36:34 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-12-16 23:02:37 +0300 |
commit | 793c21e266a0d6b5994a8f5cba9bac569fbd3bc7 (patch) | |
tree | bbd682b955fdd39ba34a24ee17f49b746a44f833 /crypto/digest | |
parent | 0aff3ffb8882a161de9550cc4ea8caacc713aadb (diff) |
Make HOST_l2c return void.
Nothing ever uses the return value. It'd be better off discarding it rather
than make callers stick (void) everywhere.
Change-Id: Ia28c970a1e5a27db441e4511249589d74408849b
Reviewed-on: https://boringssl-review.googlesource.com/6653
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/digest')
-rw-r--r-- | crypto/digest/md32_common.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/crypto/digest/md32_common.h b/crypto/digest/md32_common.h index 25665db8..4f1faf16 100644 --- a/crypto/digest/md32_common.h +++ b/crypto/digest/md32_common.h @@ -196,11 +196,11 @@ extern "C" { #endif #ifndef HOST_l2c -#define HOST_l2c(l, c) \ - (*((c)++) = (uint8_t)(((l) >> 24) & 0xff), \ - *((c)++) = (uint8_t)(((l) >> 16) & 0xff), \ - *((c)++) = (uint8_t)(((l) >> 8) & 0xff), \ - *((c)++) = (uint8_t)(((l)) & 0xff), l) +#define HOST_l2c(l, c) \ + (void)(*((c)++) = (uint8_t)(((l) >> 24) & 0xff), \ + *((c)++) = (uint8_t)(((l) >> 16) & 0xff), \ + *((c)++) = (uint8_t)(((l) >> 8) & 0xff), \ + *((c)++) = (uint8_t)(((l)) & 0xff)) #endif #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) @@ -219,11 +219,11 @@ extern "C" { #endif #ifndef HOST_l2c -#define HOST_l2c(l, c) \ - (*((c)++) = (uint8_t)(((l)) & 0xff), \ - *((c)++) = (uint8_t)(((l) >> 8) & 0xff), \ - *((c)++) = (uint8_t)(((l) >> 16) & 0xff), \ - *((c)++) = (uint8_t)(((l) >> 24) & 0xff), l) +#define HOST_l2c(l, c) \ + (void)(*((c)++) = (uint8_t)(((l)) & 0xff), \ + *((c)++) = (uint8_t)(((l) >> 8) & 0xff), \ + *((c)++) = (uint8_t)(((l) >> 16) & 0xff), \ + *((c)++) = (uint8_t)(((l) >> 24) & 0xff)) #endif #endif /* DATA_ORDER */ @@ -301,11 +301,11 @@ int HASH_FINAL(uint8_t *md, HASH_CTX *c) { /* Append a 64-bit length to the block and process it. */ uint8_t *p = c->data + HASH_CBLOCK - 8; #if defined(DATA_ORDER_IS_BIG_ENDIAN) - (void)HOST_l2c(c->Nh, p); - (void)HOST_l2c(c->Nl, p); + HOST_l2c(c->Nh, p); + HOST_l2c(c->Nl, p); #elif defined(DATA_ORDER_IS_LITTLE_ENDIAN) - (void)HOST_l2c(c->Nl, p); - (void)HOST_l2c(c->Nh, p); + HOST_l2c(c->Nl, p); + HOST_l2c(c->Nh, p); #endif assert(p == c->data + HASH_CBLOCK); HASH_BLOCK_DATA_ORDER(c->h, c->data, 1); |