]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Remove a pointless NULL check
authorVolker Lendecke <vl@samba.org>
Fri, 1 Sep 2023 11:18:14 +0000 (13:18 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 10 Oct 2023 23:23:40 +0000 (23:23 +0000)
boolean short-circuiting already gives us this condition.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/lib/util.c

index 93c01b862b35c02b438edd31d7e659a37b4e747f..b6305da91ed1f2dfdad3fcc948fe7e035d4b1205 100644 (file)
@@ -733,7 +733,7 @@ bool is_in_path(const char *name, name_compare_entry *namelist, bool case_sensit
        const char *last_component;
 
        /* if we have no list it's obviously not in the path */
-       if((namelist == NULL ) || ((namelist != NULL) && (namelist[0].name == NULL))) {
+       if ((namelist == NULL) || (namelist[0].name == NULL)) {
                return False;
        }