From: Volker Lendecke Date: Mon, 30 Dec 2024 19:15:53 +0000 (+0100) Subject: vfs: Slightly simplify acl_common_remove_object() X-Git-Tag: tdb-1.4.13~105 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d1376e6425aa367f71ca2df98dd5317071dbe7f;p=thirdparty%2Fsamba.git vfs: Slightly simplify acl_common_remove_object() This makes it more obvious to me that it's just the flag that differs between the if-branches. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_acl_common.c b/source3/modules/vfs_acl_common.c index 5686c15c777..322c2ea48d7 100644 --- a/source3/modules/vfs_acl_common.c +++ b/source3/modules/vfs_acl_common.c @@ -1041,17 +1041,10 @@ static int acl_common_remove_object(vfs_handle_struct *handle, } become_root(); - if (is_directory) { - ret = SMB_VFS_NEXT_UNLINKAT(handle, - dirfsp, - smb_fname, - AT_REMOVEDIR); - } else { - ret = SMB_VFS_NEXT_UNLINKAT(handle, - dirfsp, - smb_fname, - 0); - } + ret = SMB_VFS_NEXT_UNLINKAT(handle, + dirfsp, + smb_fname, + is_directory ? AT_REMOVEDIR : 0); unbecome_root(); return ret;