]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli: Avoid an unnecessary "else"
authorVolker Lendecke <vl@samba.org>
Mon, 25 Nov 2024 11:04:53 +0000 (12:04 +0100)
committerVolker Lendecke <vl@samba.org>
Tue, 17 Dec 2024 12:30:30 +0000 (12:30 +0000)
We return in the if-branch

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
libcli/security/security_descriptor.c

index a7159e7da7e66aec4f48810ad693796d36073858..60e206bf7da7aa68a5ade84b7b87413bb76ffb20 100644 (file)
@@ -298,7 +298,8 @@ static NTSTATUS security_descriptor_acl_add(struct security_descriptor *sd,
 
        if (idx < 0) {
                return NT_STATUS_ARRAY_BOUNDS_EXCEEDED;
-       } else if (idx > acl->num_aces) {
+       }
+       if (idx > acl->num_aces) {
                return NT_STATUS_ARRAY_BOUNDS_EXCEEDED;
        }