1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-24 02:04:21 +03:00

s4:kdc: Prefer explicit initialization to ZERO_STRUCTP()

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Joseph Sutton 2023-09-27 13:58:31 +13:00 committed by Joseph Sutton
parent fff9b71b84
commit 452aeb218d

View File

@ -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,