Merge branch 'sk/mingw-uni-fix-more'
[gitweb.git] / name-hash.c
index 49fd508317ebbde5a76f6af64318920ae237c8fd..702cd0518fca67a84417de8268ed70dfa29392e4 100644 (file)
@@ -213,12 +213,11 @@ struct cache_entry *index_dir_exists(struct index_state *istate, const char *nam
 struct cache_entry *index_file_exists(struct index_state *istate, const char *name, int namelen, int icase)
 {
        struct cache_entry *ce;
-       struct hashmap_entry key;
 
        lazy_init_name_hash(istate);
 
-       hashmap_entry_init(&key, memihash(name, namelen));
-       ce = hashmap_get(&istate->name_hash, &key, NULL);
+       ce = hashmap_get_from_hash(&istate->name_hash,
+                                  memihash(name, namelen), NULL);
        while (ce) {
                if (same_name(ce, name, namelen, icase))
                        return ce;