]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Avoid an "else", we return in the if-branch
authorVolker Lendecke <vl@samba.org>
Sun, 25 Jan 2026 09:33:19 +0000 (10:33 +0100)
committerAnoop C S <anoopcs@samba.org>
Sun, 15 Feb 2026 10:42:33 +0000 (10:42 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
lib/util/util_str.c

index 3faf204d251a4fdf08e8a2c1a3e7972bc0fb364b..a88301d71b392d86c7cb6f0c2a9db2f39da36193 100644 (file)
@@ -233,10 +233,11 @@ _PUBLIC_ bool set_boolean(const char *boolean_string, bool *boolean)
            strwicmp(boolean_string, "1") == 0) {
                *boolean = true;
                return true;
-       } else if (strwicmp(boolean_string, "no") == 0 ||
-                  strwicmp(boolean_string, "false") == 0 ||
-                  strwicmp(boolean_string, "off") == 0 ||
-                  strwicmp(boolean_string, "0") == 0) {
+       }
+       if (strwicmp(boolean_string, "no") == 0 ||
+           strwicmp(boolean_string, "false") == 0 ||
+           strwicmp(boolean_string, "off") == 0 ||
+           strwicmp(boolean_string, "0") == 0) {
                *boolean = false;
                return true;
        }