]> granicus.if.org Git - git/commitdiff
oidset: don't return value from oidset_init
authorThomas Gummerer <t.gummerer@gmail.com>
Sun, 7 Jan 2018 23:04:04 +0000 (23:04 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 8 Jan 2018 23:24:35 +0000 (15:24 -0800)
c3a9ad3117 ("oidset: add iterator methods to oidset", 2017-11-21)
introduced a 'oidset_init()' function in oidset.h, which has void as
return type, but returns an expression.

This makes the solaris compiler fail with:

    "oidset.h", line 30: void function cannot return value

As the return type is void, and even the return type of the expression
we're trying to return (oidmap_init) is void just remove the return
statement to fix the compiler error.

Signed-off-by: Thomas Gummerer <t.gummerer@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
oidset.h

index 783abceccd11e1786c7d6b54b2848f3eeb6d4983..40ec5f87fe208e8e15feeb29ff0bb9d6325f44f8 100644 (file)
--- a/oidset.h
+++ b/oidset.h
@@ -27,7 +27,7 @@ struct oidset {
 
 static inline void oidset_init(struct oidset *set, size_t initial_size)
 {
-       return oidmap_init(&set->map, initial_size);
+       oidmap_init(&set->map, initial_size);
 }
 
 /**