summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-10-06 23:30:32 +0000
committerJunio C Hamano <gitster@pobox.com>2019-10-07 10:20:10 +0900
commit26b455f21ed7e0c7b0e4e4e69b5ae48545597020 (patch)
tree0c0a69083353100d2f637322791f4499e8cb27bf /remote.c
parent28ee7941280828f9e528bd8c5d0f6515a57e0c44 (diff)
downloadgit-26b455f21ed7e0c7b0e4e4e69b5ae48545597020.tar.gz
hashmap_put takes "struct hashmap_entry *"
This is less error-prone than "void *" as the compiler now detects invalid types being passed. Signed-off-by: Eric Wong <e@80x24.org> Reviewed-by: Derrick Stolee <stolee@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index bd81cb71bc..8ca23d95dc 100644
--- a/remote.c
+++ b/remote.c
@@ -159,7 +159,7 @@ static struct remote *make_remote(const char *name, int len)
remotes[remotes_nr++] = ret;
hashmap_entry_init(&ret->ent, lookup_entry.hash);
- replaced = hashmap_put(&remotes_hash, ret);
+ replaced = hashmap_put(&remotes_hash, &ret->ent);
assert(replaced == NULL); /* no previous entry overwritten */
return ret;
}