[PATCH] Trivial cleanup in libnet

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Jan 25 07:25:47 UTC 2018


Hi!

Review appreciated!

Thanks, Volker

-- 
Besuchen Sie die verinice.XP 2018 in Berlin,
Anwenderkonferenz für Informationssicherheit
vom 21.-23.03.2018 im Sofitel Kurfürstendamm
Info & Anmeldung hier: http://veriniceXP.org

SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 7db320b7eedc9092bb02aaa3b75a6e67c5abb054 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Thu, 4 Jan 2018 20:37:16 +0100
Subject: [PATCH] libnet: Use talloc_zero instead of ZERO_STRUCTP

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source4/libnet/libnet_join.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/source4/libnet/libnet_join.c b/source4/libnet/libnet_join.c
index 0c206444a53..9a1e58f72e7 100644
--- a/source4/libnet/libnet_join.c
+++ b/source4/libnet/libnet_join.c
@@ -982,14 +982,14 @@ NTSTATUS libnet_Join_member(struct libnet_context *ctx,
 		return status;
 	}
 
-	set_secrets = talloc(tmp_mem, struct provision_store_self_join_settings);
+	set_secrets = talloc_zero(tmp_mem,
+				  struct provision_store_self_join_settings);
 	if (!set_secrets) {
 		r->out.error_string = NULL;
 		talloc_free(tmp_mem);
 		return NT_STATUS_NO_MEMORY;
 	}
-	
-	ZERO_STRUCTP(set_secrets);
+
 	set_secrets->domain_name = r2->out.domain_name;
 	set_secrets->realm = r2->out.realm;
 	set_secrets->netbios_name = netbios_name;
-- 
2.11.0



More information about the samba-technical mailing list