From: Volker Lendecke Date: Thu, 31 Aug 2023 09:33:02 +0000 (+0200) Subject: smbd: Reduce indentation, remove a nested if-statement X-Git-Tag: tevent-0.16.0~176 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e8570f73acddeb348676db0eea6c1bfd4081c647;p=thirdparty%2Fsamba.git smbd: Reduce indentation, remove a nested if-statement Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 81d275a53dc..258a41f2c85 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -6040,11 +6040,10 @@ static NTSTATUS create_file_unixpath(connection_struct *conn, * delete access. * BUG: https://bugzilla.samba.org/show_bug.cgi?id=13358 */ - if (create_options & FILE_DELETE_ON_CLOSE) { - if ((access_mask & DELETE_ACCESS) == 0) { - status = NT_STATUS_INVALID_PARAMETER; - goto fail; - } + if ((create_options & FILE_DELETE_ON_CLOSE) && + ((access_mask & DELETE_ACCESS) == 0)) { + status = NT_STATUS_INVALID_PARAMETER; + goto fail; } if ((conn->fs_capabilities & FILE_NAMED_STREAMS)