summaryrefslogtreecommitdiff
path: root/hashmap.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2020-11-02 18:55:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-02 20:15:50 (GMT)
commit97a39a4a930ebec9162f90ebd0412aed47d413d0 (patch)
treebf41f2db4b739ddc20f70d1ef1197bf6adcc2f1e /hashmap.c
parent6474b869393b2d40b6e1b3ab5633ce2bad6abe48 (diff)
downloadgit-97a39a4a930ebec9162f90ebd0412aed47d413d0.zip
git-97a39a4a930ebec9162f90ebd0412aed47d413d0.tar.gz
git-97a39a4a930ebec9162f90ebd0412aed47d413d0.tar.bz2
hashmap: adjust spacing to fix argument alignment
No actual code changes; just whitespace adjustments. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'hashmap.c')
-rw-r--r--hashmap.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/hashmap.c b/hashmap.c
index 09813e1..e44d8a3 100644
--- a/hashmap.c
+++ b/hashmap.c
@@ -92,8 +92,9 @@ static void alloc_table(struct hashmap *map, unsigned int size)
}
static inline int entry_equals(const struct hashmap *map,
- const struct hashmap_entry *e1, const struct hashmap_entry *e2,
- const void *keydata)
+ const struct hashmap_entry *e1,
+ const struct hashmap_entry *e2,
+ const void *keydata)
{
return (e1 == e2) ||
(e1->hash == e2->hash &&
@@ -101,7 +102,7 @@ static inline int entry_equals(const struct hashmap *map,
}
static inline unsigned int bucket(const struct hashmap *map,
- const struct hashmap_entry *key)
+ const struct hashmap_entry *key)
{
return key->hash & (map->tablesize - 1);
}
@@ -148,7 +149,7 @@ static int always_equal(const void *unused_cmp_data,
}
void hashmap_init(struct hashmap *map, hashmap_cmp_fn equals_function,
- const void *cmpfn_data, size_t initial_size)
+ const void *cmpfn_data, size_t initial_size)
{
unsigned int size = HASHMAP_INITIAL_SIZE;
@@ -199,7 +200,7 @@ struct hashmap_entry *hashmap_get(const struct hashmap *map,
}
struct hashmap_entry *hashmap_get_next(const struct hashmap *map,
- const struct hashmap_entry *entry)
+ const struct hashmap_entry *entry)
{
struct hashmap_entry *e = entry->next;
for (; e; e = e->next)
@@ -225,8 +226,8 @@ void hashmap_add(struct hashmap *map, struct hashmap_entry *entry)
}
struct hashmap_entry *hashmap_remove(struct hashmap *map,
- const struct hashmap_entry *key,
- const void *keydata)
+ const struct hashmap_entry *key,
+ const void *keydata)
{
struct hashmap_entry *old;
struct hashmap_entry **e = find_entry_ptr(map, key, keydata);
@@ -249,7 +250,7 @@ struct hashmap_entry *hashmap_remove(struct hashmap *map,
}
struct hashmap_entry *hashmap_put(struct hashmap *map,
- struct hashmap_entry *entry)
+ struct hashmap_entry *entry)
{
struct hashmap_entry *old = hashmap_remove(map, entry, NULL);
hashmap_add(map, entry);