]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Avoid a pointless if-statement
authorVolker Lendecke <vl@samba.org>
Tue, 24 Feb 2026 10:19:56 +0000 (11:19 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 25 Feb 2026 12:33:39 +0000 (12:33 +0000)
All you can read in optimizing guides is that branches are
expensive...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
source3/smbd/msdfs.c

index e09c2a83a61441659f390a224df3153fec6a4333..e3595b620e8d12e5fc1ca992343346e5e756973b 100644 (file)
@@ -1293,9 +1293,7 @@ char *msdfs_link_string(TALLOC_CTX *ctx,
                        goto err;
                }
 
-               if (!insert_comma) {
-                       insert_comma = true;
-               }
+               insert_comma = true;
 
                TALLOC_FREE(refpath);
        }