From: Joseph Sutton Date: Wed, 27 Sep 2023 01:00:07 +0000 (+1300) Subject: s4:kdc: Remove unnecessary assignments X-Git-Tag: tevent-0.16.0~287 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7587532292cd1fc732da3cb9fdda4d327b0c3259;p=thirdparty%2Fsamba.git s4:kdc: Remove unnecessary assignments These structures have been zero‐initialized already. 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 a42d460a768..4c4f2a57626 100644 --- a/source4/kdc/sdb_to_hdb.c +++ b/source4/kdc/sdb_to_hdb.c @@ -83,7 +83,6 @@ static int sdb_salt_to_Salt(const struct sdb_salt *s, Salt *h) free_Salt(h); return ENOMEM; } - h->opaque = NULL; return 0; } @@ -113,8 +112,6 @@ static int sdb_key_to_Key(const struct sdb_key *s, Key *h) if (rc != 0) { goto error_nomem; } - } else { - h->salt = NULL; } return 0; @@ -145,8 +142,6 @@ static int sdb_keys_to_Keys(const struct sdb_keys *s, Keys *h) ++h->len; } - } else { - h->val = NULL; } return 0; @@ -192,8 +187,6 @@ static int sdb_event_to_Event(krb5_context context, free_Event(h); return ret; } - } else { - h->principal = NULL; } h->time = s->time; @@ -266,8 +259,6 @@ int sdb_entry_to_hdb_entry(krb5_context context, if (rc != 0) { goto error; } - } else { - h->modified_by = NULL; } if (s->valid_start != NULL) { @@ -277,8 +268,6 @@ int sdb_entry_to_hdb_entry(krb5_context context, goto error; } *h->valid_start = *s->valid_start; - } else { - h->valid_start = NULL; } if (s->valid_end != NULL) { @@ -288,8 +277,6 @@ int sdb_entry_to_hdb_entry(krb5_context context, goto error; } *h->valid_end = *s->valid_end; - } else { - h->valid_end = NULL; } if (s->pw_end != NULL) { @@ -299,8 +286,6 @@ int sdb_entry_to_hdb_entry(krb5_context context, goto error; } *h->pw_end = *s->pw_end; - } else { - h->pw_end = NULL; } if (s->max_life != NULL) { @@ -310,8 +295,6 @@ int sdb_entry_to_hdb_entry(krb5_context context, goto error; } *h->max_life = *s->max_life; - } else { - h->max_life = NULL; } if (s->max_renew != NULL) { @@ -321,13 +304,10 @@ int sdb_entry_to_hdb_entry(krb5_context context, goto error; } *h->max_renew = *s->max_renew; - } else { - h->max_renew = NULL; } sdb_flags_to_hdb_flags(&s->flags, &h->flags); - h->etypes = NULL; if (s->etypes != NULL) { h->etypes = malloc(sizeof(*h->etypes)); if (h->etypes == NULL) { @@ -348,7 +328,6 @@ int sdb_entry_to_hdb_entry(krb5_context context, } } - h->session_etypes = NULL; if (s->session_etypes != NULL) { h->session_etypes = malloc(sizeof(*h->session_etypes)); if (h->session_etypes == NULL) {