]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
lib: Streamline a struct assignment
authorVolker Lendecke <vl@samba.org>
Thu, 2 Jul 2026 11:40:04 +0000 (13:40 +0200)
committerAnoop C S <anoopcs@samba.org>
Mon, 3 Aug 2026 09:05:30 +0000 (09:05 +0000)
No need to do the struct assignment and then modify the struct in a separate
step.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
lib/util/asn1.c

index ff9cebc06e59bfc282b839f569d1b9d327f2bdf9..277c6d7ea6bcd41b3f5908264b5f873cdc676954 100644 (file)
@@ -1167,8 +1167,10 @@ bool asn1_extract_blob(struct asn1_data *asn1, TALLOC_CTX *mem_ctx,
                return false;
        }
 
-       *pblob = (DATA_BLOB) { .length = blob.length };
-       pblob->data = talloc_move(mem_ctx, &blob.data);
+       *pblob = (DATA_BLOB){
+               .length = blob.length,
+               .data = talloc_move(mem_ctx, &blob.data),
+       };
 
        /*
         * Stop access from here on