]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sub-process.c
Merge tag 'l10n-2.24.0-rnd2' of https://github.com/git-l10n/git-po
[thirdparty/git.git] / sub-process.c
index f2fcc16c3ec57dd71eece34af13b597d58a56e90..1b1af9dcbd95990dfd9d0ef11471f766a6015a80 100644 (file)
@@ -6,12 +6,14 @@
 #include "pkt-line.h"
 
 int cmd2process_cmp(const void *unused_cmp_data,
-                   const void *entry,
-                   const void *entry_or_key,
+                   const struct hashmap_entry *eptr,
+                   const struct hashmap_entry *entry_or_key,
                    const void *unused_keydata)
 {
-       const struct subprocess_entry *e1 = entry;
-       const struct subprocess_entry *e2 = entry_or_key;
+       const struct subprocess_entry *e1, *e2;
+
+       e1 = container_of(eptr, const struct subprocess_entry, ent);
+       e2 = container_of(entry_or_key, const struct subprocess_entry, ent);
 
        return strcmp(e1->cmd, e2->cmd);
 }
@@ -22,8 +24,7 @@ struct subprocess_entry *subprocess_find_entry(struct hashmap *hashmap, const ch
 
        hashmap_entry_init(&key.ent, strhash(cmd));
        key.cmd = cmd;
-       return hashmap_get_entry(hashmap, &key, NULL,
-                               struct subprocess_entry, ent);
+       return hashmap_get_entry(hashmap, &key, ent, NULL);
 }
 
 int subprocess_read_status(int fd, struct strbuf *status)