aboutsummaryrefslogtreecommitdiff
path: root/rpc_hash.c
diff options
context:
space:
mode:
authorPaul Selkirk <paul@psgd.org>2017-10-23 18:05:31 -0400
committerPaul Selkirk <paul@psgd.org>2017-10-23 18:05:31 -0400
commitca84af553cbaae45b17cce04d457b2e61cc4277c (patch)
tree90f2bc5e96d2f1ae3fece3dfb9075edda08c4ace /rpc_hash.c
parent12a3c63b75044b207dd7982ce3ed170231bd4467 (diff)
Cleanup signed/unsigned mismatches, mostly in loop counters
Diffstat (limited to 'rpc_hash.c')
-rw-r--r--rpc_hash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rpc_hash.c b/rpc_hash.c
index 0811e81..13b6891 100644
--- a/rpc_hash.c
+++ b/rpc_hash.c
@@ -93,7 +93,7 @@ static inline handle_slot_t *alloc_handle(const int is_hmac)
#if HAL_STATIC_HASH_STATE_BLOCKS > 0
if (!is_hmac) {
- for (int i = 0; i < sizeof(hash_handle)/sizeof(*hash_handle); i++) {
+ for (size_t i = 0; i < sizeof(hash_handle)/sizeof(*hash_handle); i++) {
if (hash_handle[i].state.hash != NULL)
continue;
hash_handle[i].hash_handle.handle = i | glop;
@@ -104,7 +104,7 @@ static inline handle_slot_t *alloc_handle(const int is_hmac)
#if HAL_STATIC_HMAC_STATE_BLOCKS > 0
if (is_hmac) {
- for (int i = 0; i < sizeof(hmac_handle)/sizeof(*hmac_handle); i++) {
+ for (size_t i = 0; i < sizeof(hmac_handle)/sizeof(*hmac_handle); i++) {
if (hmac_handle[i].state.hmac != NULL)
continue;
hmac_handle[i].hash_handle.handle = i | glop | HANDLE_FLAG_HMAC;
@@ -124,7 +124,7 @@ static inline handle_slot_t *alloc_handle(const int is_hmac)
static inline handle_slot_t *find_handle(const hal_hash_handle_t handle)
{
#if HAL_STATIC_HASH_STATE_BLOCKS > 0 || HAL_STATIC_HMAC_STATE_BLOCKS > 0
- const int i = (int) (handle.handle & 0xFFFF);
+ const size_t i = (size_t) (handle.handle & 0xFFFF);
const int is_hmac = (handle.handle & HANDLE_FLAG_HMAC) != 0;
#endif