From: Joseph Sutton Date: Wed, 27 Sep 2023 00:58:31 +0000 (+1300) Subject: s4:kdc: Prefer explicit initialization to ZERO_STRUCTP() X-Git-Tag: tevent-0.16.0~289 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=452aeb218d990c8eab2d876d22fedc92e13dfeee;p=thirdparty%2Fsamba.git s4:kdc: Prefer explicit initialization to ZERO_STRUCTP() Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/kdc/sdb_to_hdb.c b/source4/kdc/sdb_to_hdb.c index fb84a963fec..6609bc6d803 100644 --- a/source4/kdc/sdb_to_hdb.c +++ b/source4/kdc/sdb_to_hdb.c @@ -75,7 +75,7 @@ static int sdb_salt_to_Salt(const struct sdb_salt *s, Salt *h) { int ret; - ZERO_STRUCTP(h); + *h = (struct Salt) {}; h->type = s->type; ret = smb_krb5_copy_data_contents(&h->salt, s->salt.data, s->salt.length); @@ -92,7 +92,7 @@ static int sdb_key_to_Key(const struct sdb_key *s, Key *h) { int rc; - ZERO_STRUCTP(h); + *h = (struct Key) {}; h->key.keytype = s->key.keytype; rc = smb_krb5_copy_data_contents(&h->key.keyvalue, @@ -128,7 +128,7 @@ static int sdb_keys_to_Keys(const struct sdb_keys *s, Keys *h) { int ret, i; - ZERO_STRUCTP(h); + *h = (struct Keys) {}; if (s->val != NULL) { h->val = malloc(s->len * sizeof(Key)); @@ -182,7 +182,7 @@ static int sdb_event_to_Event(krb5_context context, { int ret; - ZERO_STRUCTP(h); + *h = (struct Event) {}; if (s->principal != NULL) { ret = krb5_copy_principal(context, @@ -208,7 +208,7 @@ int sdb_entry_to_hdb_entry(krb5_context context, unsigned int i; int rc; - ZERO_STRUCTP(h); + *h = (hdb_entry) {}; rc = krb5_copy_principal(context, s->principal,