]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
librpc: Slightly simplify dcerpc_binding_build_tower()
authorVolker Lendecke <vl@samba.org>
Wed, 24 Dec 2025 10:01:36 +0000 (11:01 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 7 Jan 2026 09:57:40 +0000 (09:57 +0000)
Use the implicit NULLing out of the other struct elements

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

index e0d66303583a7caefd1785b56654f5c4a1cddd06..f7b47db57e5683b050796a11aa39e0b142ffd213 100644 (file)
@@ -1467,9 +1467,9 @@ _PUBLIC_ NTSTATUS dcerpc_binding_build_tower(TALLOC_CTX *mem_ctx,
 
        /* Floor 2 to num_protocols */
        for (i = 0; i < num_protocols; i++) {
-               tower->floors[2 + i].lhs.protocol = protseq[i];
-               tower->floors[2 + i].lhs.lhs_data = data_blob_null;
-               ZERO_STRUCT(tower->floors[2 + i].rhs);
+               tower->floors[2 + i] = (struct epm_floor) {
+                       .lhs.protocol = protseq[i],
+               };
                status = dcerpc_floor_set_rhs_data(tower->floors,
                                                   &tower->floors[2 + i],
                                                   NULL);