]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Slightly simplify smbd_smb2_create_send()
authorVolker Lendecke <vl@samba.org>
Sun, 27 Dec 2020 11:13:51 +0000 (12:13 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 12 Jan 2021 00:10:30 +0000 (00:10 +0000)
If we return unconditionally, "else" is not needed

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/smb2_create.c

index 9e8d98532660b9cdf7432b7dd2b91e9d97aba6a9..2dd3745dd329dc28680425b5da110fd43a025efd 100644 (file)
@@ -776,8 +776,9 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
 
                smbd_smb2_create_finish(req);
                return req;
+       }
 
-       } else if (CAN_PRINT(smb1req->conn)) {
+       if (CAN_PRINT(smb1req->conn)) {
                if (state->dhnc != NULL || state->dh2c != NULL) {
                        /* durable handles are not supported on printers */
                        tevent_req_nterror(req, NT_STATUS_OBJECT_NAME_NOT_FOUND);
@@ -836,8 +837,9 @@ static struct tevent_req *smbd_smb2_create_send(TALLOC_CTX *mem_ctx,
 
                smbd_smb2_create_finish(req);
                return req;
+       }
 
-       } else if (state->do_durable_reconnect) {
+       if (state->do_durable_reconnect) {
                DATA_BLOB new_cookie = data_blob_null;
                NTTIME now = timeval_to_nttime(&smb2req->request_time);