]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sub-process.c
hashmap_get takes "const struct hashmap_entry *"
[thirdparty/git.git] / sub-process.c
index 3f4af935557c5ee22b0b1b9b43d2778161210765..debd86bb689f4b68d86d9024dd27e8a315d0c09b 100644 (file)
@@ -20,9 +20,9 @@ struct subprocess_entry *subprocess_find_entry(struct hashmap *hashmap, const ch
 {
        struct subprocess_entry key;
 
-       hashmap_entry_init(&key, strhash(cmd));
+       hashmap_entry_init(&key.ent, strhash(cmd));
        key.cmd = cmd;
-       return hashmap_get(hashmap, &key, NULL);
+       return hashmap_get(hashmap, &key.ent, NULL);
 }
 
 int subprocess_read_status(int fd, struct strbuf *status)
@@ -96,7 +96,7 @@ int subprocess_start(struct hashmap *hashmap, struct subprocess_entry *entry, co
                return err;
        }
 
-       hashmap_entry_init(entry, strhash(cmd));
+       hashmap_entry_init(&entry->ent, strhash(cmd));
 
        err = startfn(entry);
        if (err) {
@@ -105,7 +105,7 @@ int subprocess_start(struct hashmap *hashmap, struct subprocess_entry *entry, co
                return err;
        }
 
-       hashmap_add(hashmap, entry);
+       hashmap_add(hashmap, &entry->ent);
        return 0;
 }