This makes it more obvious to me that it's just the flag that differs
between the if-branches.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
}
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;