]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: Prefer explicit initialization to ZERO_STRUCTP()
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 27 Sep 2023 00:58:31 +0000 (13:58 +1300)
committerJoseph Sutton <jsutton@samba.org>
Sun, 1 Oct 2023 22:45:38 +0000 (22:45 +0000)
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/sdb_to_hdb.c

index fb84a963fec90a63917b57b16754c261eeff0437..6609bc6d803b709d58638c703141d6d2b6065bfd 100644 (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,