From ca84af553cbaae45b17cce04d457b2e61cc4277c Mon Sep 17 00:00:00 2001 From: Paul Selkirk Date: Mon, 23 Oct 2017 18:05:31 -0400 Subject: Cleanup signed/unsigned mismatches, mostly in loop counters --- ks_index.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ks_index.c') diff --git a/ks_index.c b/ks_index.c index 644aecf..dcc0fe0 100644 --- a/ks_index.c +++ b/ks_index.c @@ -55,7 +55,7 @@ static int ks_find(const hal_ks_t * const ks, if (ks == NULL || ks->index == NULL || ks->names == NULL || uuid == NULL || where == NULL) return 0; - if (hint != NULL && *hint >= 0 && *hint < ks->used && + if (hint != NULL && *hint >= 0 && *hint < (int)ks->used && hal_uuid_cmp(uuid, &ks->names[ks->index[*hint]]) == 0) { *where = *hint; return 1; @@ -153,7 +153,7 @@ hal_error_t hal_ks_index_fsck(hal_ks_t *ks) ks->size == 0 || ks->used > ks->size) return HAL_ERROR_BAD_ARGUMENTS; - for (int i = 1; i < ks->used; i++) + for (unsigned i = 1; i < ks->used; i++) if (hal_uuid_cmp(&ks->names[ks->index[i - 1]], &ks->names[ks->index[i]]) >= 0) return HAL_ERROR_KS_INDEX_UUID_MISORDERED; -- cgit v1.2.3