summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2019-03-10 15:40:45 +0100
committerJeremy Allison <jra@samba.org>2019-03-18 19:21:23 +0000
commit068f42bed782f3489086909b202be942d1160845 (patch)
tree7c70cf79c9107b4221ca7394b2c6083768caacfd
parent2f3e251dccbd2c7a79789b9a48c12c360a17fc91 (diff)
downloadsamba-068f42bed782f3489086909b202be942d1160845.tar.gz
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>
-rw-r--r--libcli/smb/smb2_create_blob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcli/smb/smb2_create_blob.c b/libcli/smb/smb2_create_blob.c
index 5bbcec4e4a8..457ed290fba 100644
--- a/libcli/smb/smb2_create_blob.c
+++ b/libcli/smb/smb2_create_blob.c
@@ -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;