diff options
author | Volker Lendecke <vl@samba.org> | 2014-06-20 08:53:49 +0000 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2014-06-21 20:38:11 +0200 |
commit | 78827623eb9ebf96df13dfbe8e1a0ec3aa6d16a3 (patch) | |
tree | eeb92f28cbe482d40071a7bd96217f1c6a007551 /source3/libsmb/clifile.c | |
parent | 700b43940a6984fb4e4e4b7ad96804501cf71bca (diff) | |
download | samba-78827623eb9ebf96df13dfbe8e1a0ec3aa6d16a3.tar.gz |
libsmb: Align cli_ntcreate with other sync wrappers
... saves 5 lines :-)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/libsmb/clifile.c')
-rw-r--r-- | source3/libsmb/clifile.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index c8a36104c29..aee1745af4d 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -2015,12 +2015,10 @@ NTSTATUS cli_ntcreate(struct cli_state *cli, uint16_t *pfid, struct smb_create_returns *cr) { - TALLOC_CTX *frame = NULL; + TALLOC_CTX *frame = talloc_stackframe(); struct tevent_context *ev; struct tevent_req *req; - NTSTATUS status = NT_STATUS_OK; - - frame = talloc_stackframe(); + NTSTATUS status = NT_STATUS_NO_MEMORY; if (smbXcli_conn_has_async_calls(cli->conn)) { /* @@ -2032,7 +2030,6 @@ NTSTATUS cli_ntcreate(struct cli_state *cli, ev = samba_tevent_context_init(frame); if (ev == NULL) { - status = NT_STATUS_NO_MEMORY; goto fail; } @@ -2041,12 +2038,10 @@ NTSTATUS cli_ntcreate(struct cli_state *cli, CreateDisposition, CreateOptions, SecurityFlags); if (req == NULL) { - status = NT_STATUS_NO_MEMORY; goto fail; } - if (!tevent_req_poll(req, ev)) { - status = map_nt_error_from_unix(errno); + if (!tevent_req_poll_ntstatus(req, ev, &status)) { goto fail; } |