diff options
author | Paul Selkirk <paul@psgd.org> | 2017-10-23 18:05:31 -0400 |
---|---|---|
committer | Paul Selkirk <paul@psgd.org> | 2017-10-23 18:05:31 -0400 |
commit | ca84af553cbaae45b17cce04d457b2e61cc4277c (patch) | |
tree | 90f2bc5e96d2f1ae3fece3dfb9075edda08c4ace /ks_index.c | |
parent | 12a3c63b75044b207dd7982ce3ed170231bd4467 (diff) |
Cleanup signed/unsigned mismatches, mostly in loop counters
Diffstat (limited to 'ks_index.c')
-rw-r--r-- | ks_index.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |