From: Volker Lendecke Date: Sun, 27 Dec 2020 11:13:51 +0000 (+0100) Subject: smbd: Slightly simplify smbd_smb2_create_send() X-Git-Tag: samba-4.14.0rc1~119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c16c212fda67734c604f799ea25348d721312e0;p=thirdparty%2Fsamba.git smbd: Slightly simplify smbd_smb2_create_send() If we return unconditionally, "else" is not needed Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/smbd/smb2_create.c b/source3/smbd/smb2_create.c index 9e8d9853266..2dd3745dd32 100644 --- a/source3/smbd/smb2_create.c +++ b/source3/smbd/smb2_create.c @@ -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);