1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-08 21:18:16 +03:00

s4:kdc: Remove unnecessary assignments

These structures have been zero‐initialized already.

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 14:00:07 +13:00 committed by Joseph Sutton
parent af22a6552d
commit 7587532292

View File

@ -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) {