]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libcli: Initialize a variable at declaration time
authorVolker Lendecke <vl@samba.org>
Wed, 24 Dec 2025 09:52:18 +0000 (10:52 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 7 Jan 2026 09:57:41 +0000 (09:57 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
libcli/smb/smb2cli_create.c

index e740365412e986bac9e42976abdff4e39448c77b..bfee1b49a169e84499622ec43273ad538a23463a 100644 (file)
@@ -62,7 +62,7 @@ struct tevent_req *smb2cli_create_send(
        struct tevent_req *req, *subreq;
        struct smb2cli_create_state *state;
        uint8_t *fixed;
-       DATA_BLOB blob;
+       DATA_BLOB blob = {};
        NTSTATUS status;
        size_t blobs_offset;
        uint8_t *dyn;
@@ -111,8 +111,6 @@ struct tevent_req *smb2cli_create_send(
        SSVAL(fixed, 44, SMB2_HDR_BODY + 56);
        SSVAL(fixed, 46, state->name_utf16_len);
 
-       blob = data_blob_null;
-
        if (blobs != NULL) {
                status = smb2_create_blob_push(state, &blob, *blobs);
                if (tevent_req_nterror(req, status)) {