]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmb: Save a few lines in cli_unix_extensions_version()
authorVolker Lendecke <vl@samba.org>
Sat, 13 Aug 2022 13:43:47 +0000 (15:43 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 26 Aug 2022 18:54:37 +0000 (18:54 +0000)
This is more recent style for sync wrappers

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/clifsinfo.c

index c4e2a01bc45bba81e12f86c981ecf9e476c49734..39083c68e37c249b301d544b5ea987ca3f13d012 100644 (file)
@@ -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: