diff: avoid redundantly clearing a flag
[gitweb.git] / attr.c
diff --git a/attr.c b/attr.c
index ebdcfb0b8a8e9ddb50f559336146140b4b167e06..56961f02361129b5cb49e6ffb7ab185655f09c41 100644 (file)
--- a/attr.c
+++ b/attr.c
@@ -9,6 +9,7 @@
 
 #define NO_THE_INDEX_COMPATIBILITY_MACROS
 #include "cache.h"
+#include "config.h"
 #include "exec_cmd.h"
 #include "attr.h"
 #include "dir.h"
@@ -75,9 +76,10 @@ struct attr_hash_entry {
 };
 
 /* attr_hashmap comparison function */
-static int attr_hash_entry_cmp(const struct attr_hash_entry *a,
+static int attr_hash_entry_cmp(void *unused_cmp_data,
+                              const struct attr_hash_entry *a,
                               const struct attr_hash_entry *b,
-                              void *unused)
+                              void *unused_keydata)
 {
        return (a->keylen != b->keylen) || strncmp(a->key, b->key, a->keylen);
 }
@@ -85,7 +87,7 @@ static int attr_hash_entry_cmp(const struct attr_hash_entry *a,
 /* Initialize an 'attr_hashmap' object */
 static void attr_hashmap_init(struct attr_hashmap *map)
 {
-       hashmap_init(&map->map, (hashmap_cmp_fn) attr_hash_entry_cmp, 0);
+       hashmap_init(&map->map, (hashmap_cmp_fn) attr_hash_entry_cmp, NULL, 0);
 }
 
 /*