]> git.ipfire.org Git - thirdparty/git.git/commitdiff
hashmap: fix documentation misuses of -> versus .
authorElijah Newren <newren@gmail.com>
Tue, 5 Nov 2019 23:31:31 +0000 (23:31 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Nov 2019 05:40:56 +0000 (14:40 +0900)
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
hashmap.h

index bd2701549f55650748c7cfd5afd2dad6c2321f54..6036069c23d1b729bd5be976bcd3d9b4ba3572c7 100644 (file)
--- a/hashmap.h
+++ b/hashmap.h
@@ -59,7 +59,7 @@
  *
  *         if (!strcmp("print_all_by_key", action)) {
  *             struct long2string k, *e;
- *             hashmap_entry_init(&k->ent, memhash(&key, sizeof(long)));
+ *             hashmap_entry_init(&k.ent, memhash(&key, sizeof(long)));
  *             k.key = key;
  *
  *             flags &= ~COMPARE_VALUE;
  *
  *         if (!strcmp("has_exact_match_no_heap_alloc", action)) {
  *             struct long2string k;
- *             hashmap_entry_init(&k->ent, memhash(&key, sizeof(long)));
+ *             hashmap_entry_init(&k.ent, memhash(&key, sizeof(long)));
  *             k.key = key;
  *
  *             flags |= COMPARE_VALUE;
  *             printf("%sfound\n",
- *                    hashmap_get(&map, &k->ent, value) ? "" : "not ");
+ *                    hashmap_get(&map, &k.ent, value) ? "" : "not ");
  *         }
  *
  *         if (!strcmp("end", action)) {