]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
librpc: Use a direct struct initialization
authorVolker Lendecke <vl@samba.org>
Wed, 24 Dec 2025 09:30:09 +0000 (10:30 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 7 Jan 2026 09:57:41 +0000 (09:57 +0000)
Don't reference data_blob_null without need

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
librpc/rpc/dcerpc_util.c

index e01391e6dcd78f6e7e15cf93442415f745e689a6..7252575aad81fd76333990da45d8c5b73b3a01af 100644 (file)
@@ -1022,11 +1022,13 @@ struct ndr_syntax_id dcerpc_construct_bind_time_features(uint64_t features)
 
 NTSTATUS dcerpc_generic_session_key(DATA_BLOB *session_key)
 {
-       *session_key = data_blob_null;
-
        /* this took quite a few CPU cycles to find ... */
-       session_key->data = discard_const_p(unsigned char, "SystemLibraryDTC");
-       session_key->length = 16;
+
+       *session_key = (DATA_BLOB) {
+               .data = discard_const_p(unsigned char, "SystemLibraryDTC"),
+               .length = 16,
+       };
+
        return NT_STATUS_OK;
 }