From: Volker Lendecke Date: Mon, 27 Jan 2020 16:00:59 +0000 (+0100) Subject: passdb: Use struct allocation X-Git-Tag: ldb-2.1.1~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21359f4fc60ed5cd99f85fe96f1b3d59768767fc;p=thirdparty%2Fsamba.git passdb: Use struct allocation Give the compiler more info Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider --- diff --git a/source3/passdb/machine_sid.c b/source3/passdb/machine_sid.c index cdef1d61c97..fa420d8edfe 100644 --- a/source3/passdb/machine_sid.c +++ b/source3/passdb/machine_sid.c @@ -65,11 +65,11 @@ static void generate_random_sid(struct dom_sid *sid) int i; uchar raw_sid_data[12]; - ZERO_STRUCTP(sid); + *sid = (struct dom_sid) { + .sid_rev_num = 1, + .id_auth[5] = 5, + }; - sid->sid_rev_num = 1; - sid->id_auth[5] = 5; - sid->num_auths = 0; sid->sub_auths[sid->num_auths++] = 21; generate_random_buffer(raw_sid_data, 12);