From ba70eb480cbdf3ceb414208e7d135b6647c99b7b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 13 Aug 2022 15:43:47 +0200 Subject: [PATCH] libsmb: Save a few lines in cli_unix_extensions_version() This is more recent style for sync wrappers Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- source3/libsmb/clifsinfo.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/source3/libsmb/clifsinfo.c b/source3/libsmb/clifsinfo.c index c4e2a01bc45..39083c68e37 100644 --- a/source3/libsmb/clifsinfo.c +++ b/source3/libsmb/clifsinfo.c @@ -125,7 +125,7 @@ NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16_t *pmajor, TALLOC_CTX *frame = talloc_stackframe(); struct tevent_context *ev; struct tevent_req *req; - NTSTATUS status = NT_STATUS_OK; + NTSTATUS status = NT_STATUS_NO_MEMORY; if (smbXcli_conn_has_async_calls(cli->conn)) { /* @@ -134,23 +134,17 @@ NTSTATUS cli_unix_extensions_version(struct cli_state *cli, uint16_t *pmajor, status = NT_STATUS_INVALID_PARAMETER; goto fail; } - ev = samba_tevent_context_init(frame); if (ev == NULL) { - status = NT_STATUS_NO_MEMORY; goto fail; } - req = cli_unix_extensions_version_send(frame, ev, cli); if (req == NULL) { - status = NT_STATUS_NO_MEMORY; goto fail; } - if (!tevent_req_poll_ntstatus(req, ev, &status)) { goto fail; } - status = cli_unix_extensions_version_recv(req, pmajor, pminor, pcaplow, pcaphigh); fail: -- 2.47.3