]> git.ipfire.org Git - people/ms/network.git/commitdiff
config: Compare truthiness case-insensitively
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 5 Jun 2023 16:47:41 +0000 (16:47 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 5 Jun 2023 16:47:41 +0000 (16:47 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/networkd/config.c

index 8269edeb1fe1fd5642a2c1cc1725f85b8b187d82..78448df2ee641ee5ac6dd5382f9e93dd8f61b83d 100644 (file)
@@ -407,7 +407,7 @@ int nw_config_get_bool(nw_config* config, const char* key) {
 
        // Check if we match any known true words
        for (const char** s = nw_config_true; *s; s++) {
-               if (strcmp(value, *s) == 0)
+               if (strcasecmp(value, *s) == 0)
                        return 1;
        }