]> git.ipfire.org Git - location/libloc.git/commitdiff
stringpool: Allow adding empty strings
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 11 Jul 2021 11:56:50 +0000 (11:56 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 11 Jul 2021 11:56:50 +0000 (11:56 +0000)
This is what we do when we initialize the stringpool

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/stringpool.c

index ac0c1eb7da963667ae13a4bb8af30d1b2a42cedc..cb131791fcee661effb72f7f657a64e55c402186 100644 (file)
@@ -81,7 +81,7 @@ static int loc_stringpool_grow(struct loc_stringpool* pool, size_t length) {
 }
 
 static off_t loc_stringpool_append(struct loc_stringpool* pool, const char* string) {
-       if (!string || !*string)
+       if (!string)
                return -EINVAL;
 
        DEBUG(pool->ctx, "Appending '%s' to string pool at %p\n", string, pool);