Same number of .text bytes, but simpler code.
Yes, this is {{0}} instead of {0}, which I always promote. I've just read a
comment on stackoverflow (which I've unfortunately just closed the tab for :-()
that {{0}} might actually be the correct way to init a struct to zero if the
first struct element is again a struct. I'm lost. 25 years of C coding and I
have no clue of the language :-(
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
.status = NT_STATUS_INTERNAL_ERROR,
.required_flags = context->client.required_flags,
};
- static const struct netr_Credential zero_creds;
*_creds = NULL;
* mark it as invalid for step operations.
*/
fstate.creds->sequence = 0;
- fstate.creds->seed = zero_creds;
- fstate.creds->client = zero_creds;
- fstate.creds->server = zero_creds;
+ fstate.creds->seed = (struct netr_Credential) {{0}};
+ fstate.creds->client = (struct netr_Credential) {{0}};
+ fstate.creds->server = (struct netr_Credential) {{0}};
if (context->server.cached_flags == fstate.creds->negotiate_flags) {
*_creds = fstate.creds;