From: Volker Lendecke Date: Fri, 17 May 2024 10:28:53 +0000 (+0200) Subject: libsmb: Avoid pointless intermediate variables X-Git-Tag: tdb-1.4.11~617 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0013105eb55a9f0771c1980f27ef67d6cc2fd78a;p=thirdparty%2Fsamba.git libsmb: Avoid pointless intermediate variables Signed-off-by: Volker Lendecke Reviewed-by: Andrew Bartlett --- diff --git a/source3/libsmb/cli_smb2_fnum.c b/source3/libsmb/cli_smb2_fnum.c index ea50fd978d9..22327f397c6 100644 --- a/source3/libsmb/cli_smb2_fnum.c +++ b/source3/libsmb/cli_smb2_fnum.c @@ -710,8 +710,6 @@ struct tevent_req *cli_smb2_delete_on_close_send(TALLOC_CTX *mem_ctx, struct tevent_req *req = NULL; struct cli_smb2_delete_on_close_state *state = NULL; struct tevent_req *subreq = NULL; - uint8_t in_info_type; - uint8_t in_file_info_class; req = tevent_req_create(mem_ctx, &state, struct cli_smb2_delete_on_close_state); @@ -720,26 +718,19 @@ struct tevent_req *cli_smb2_delete_on_close_send(TALLOC_CTX *mem_ctx, } state->cli = cli; - /* - * setinfo on the handle with info_type SMB2_SETINFO_FILE (1), - * level 13 (SMB_FILE_DISPOSITION_INFORMATION - 1000). - */ - in_info_type = 1; - in_file_info_class = FSCC_FILE_DISPOSITION_INFORMATION; /* Setup data array. */ SCVAL(&state->data[0], 0, flag ? 1 : 0); state->inbuf.data = &state->data[0]; state->inbuf.length = 1; - subreq = cli_smb2_set_info_fnum_send( - state, - ev, - cli, - fnum, - in_info_type, - in_file_info_class, - &state->inbuf, - 0); + subreq = cli_smb2_set_info_fnum_send(state, + ev, + cli, + fnum, + SMB2_0_INFO_FILE, + FSCC_FILE_DISPOSITION_INFORMATION, + &state->inbuf, + 0); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); }