summaryrefslogtreecommitdiff
path: root/strmap.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-12-15 21:25:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-15 23:30:44 (GMT)
commit37e73233c34ceac9f16bd8e7c33ae4c8a4157b1c (patch)
tree9a70a31b2d306faf3b271768c36398723e1f877c /strmap.h
parent449a900969d0f060d054e5a13084bed318da3a31 (diff)
downloadgit-37e73233c34ceac9f16bd8e7c33ae4c8a4157b1c.zip
git-37e73233c34ceac9f16bd8e7c33ae4c8a4157b1c.tar.gz
git-37e73233c34ceac9f16bd8e7c33ae4c8a4157b1c.tar.bz2
strmap: make callers of strmap_remove() to call it in void context
Two "static inline" functions, both of which return void, call strmap_remove() and tries to return the value it returns as their return value, which is just bogus, as strmap_remove() returns void itself. Call it in the void context and fall-thru the control to the end instead. Reported-by: Randall S. Becker <rsbecker@nexbridge.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'strmap.h')
-rw-r--r--strmap.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/strmap.h b/strmap.h
index c4c1044..1e152d8 100644
--- a/strmap.h
+++ b/strmap.h
@@ -165,7 +165,7 @@ static inline int strintmap_contains(struct strintmap *map, const char *str)
static inline void strintmap_remove(struct strintmap *map, const char *str)
{
- return strmap_remove(&map->map, str, 0);
+ strmap_remove(&map->map, str, 0);
}
static inline int strintmap_empty(struct strintmap *map)
@@ -249,7 +249,7 @@ static inline int strset_contains(struct strset *set, const char *str)
static inline void strset_remove(struct strset *set, const char *str)
{
- return strmap_remove(&set->map, str, 0);
+ strmap_remove(&set->map, str, 0);
}
static inline int strset_empty(struct strset *set)