libbpf, hashmap: Fix signedness warnings
[linux-2.6-microblaze.git] / tools / lib / bpf / hashmap.c
index cffb962..a405dad 100644 (file)
@@ -60,7 +60,7 @@ struct hashmap *hashmap__new(hashmap_hash_fn hash_fn,
 void hashmap__clear(struct hashmap *map)
 {
        struct hashmap_entry *cur, *tmp;
-       int bkt;
+       size_t bkt;
 
        hashmap__for_each_entry_safe(map, cur, tmp, bkt) {
                free(cur);
@@ -100,8 +100,7 @@ static int hashmap_grow(struct hashmap *map)
        struct hashmap_entry **new_buckets;
        struct hashmap_entry *cur, *tmp;
        size_t new_cap_bits, new_cap;
-       size_t h;
-       int bkt;
+       size_t h, bkt;
 
        new_cap_bits = map->cap_bits + 1;
        if (new_cap_bits < HASHMAP_MIN_CAP_BITS)