1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

libsmb: Use a direct struct initializer

There's a few ways to initialize a DATA_BLOB to NULL. There's the
variable data_blob_null, there's ZERO_STRUCTP, and the explicit
initializer. And there's the data_blob() macro which calls into
data_blob_talloc_named. You have to look at that routine to see that
this is nothing more than a ZERO_STRUCT() and not calling into
talloc. Choose the more direct way.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
Volker Lendecke 2019-03-10 15:40:45 +01:00 committed by Jeremy Allison
parent 2f3e251dcc
commit 068f42bed7

View File

@ -159,7 +159,7 @@ NTSTATUS smb2_create_blob_push(TALLOC_CTX *mem_ctx, DATA_BLOB *buffer,
uint32_t i;
NTSTATUS status;
*buffer = data_blob(NULL, 0);
*buffer = (DATA_BLOB) { 0 };
for (i=0; i < blobs.num_blobs; i++) {
bool last = false;
const struct smb2_create_blob *c;