mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
libsmb: Slightly simplify cli_smb2_create_fnum_send()
We can now write to fname directly. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
c64c8af6d4
commit
833cb4cb81
@ -288,12 +288,7 @@ struct tevent_req *cli_smb2_create_fnum_send(
|
|||||||
|
|
||||||
/* Or end in a '\' */
|
/* Or end in a '\' */
|
||||||
if (fname_len > 0 && fname[fname_len-1] == '\\') {
|
if (fname_len > 0 && fname[fname_len-1] == '\\') {
|
||||||
char *new_fname = talloc_strdup(state, fname);
|
fname[fname_len-1] = '\0';
|
||||||
if (tevent_req_nomem(new_fname, req)) {
|
|
||||||
return tevent_req_post(req, ev);
|
|
||||||
}
|
|
||||||
new_fname[fname_len-1] = '\0';
|
|
||||||
fname = new_fname;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
subreq = smb2cli_create_send(state, ev,
|
subreq = smb2cli_create_send(state, ev,
|
||||||
|
Loading…
Reference in New Issue
Block a user