We don't need to memzero the struct when we can struct-initialize it a
bit later, implicitly initializing the rest to zero.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
* anyway, so we postpone this into an immediate event.
*/
- state = talloc_zero(sconn, struct break_to_none_state);
+ state = talloc(sconn, struct break_to_none_state);
if (state == NULL) {
DEBUG(1, ("talloc failed\n"));
return;
}
- state->sconn = sconn;
- state->id = fsp->file_id;
+ *state = (struct break_to_none_state) {
+ .sconn = sconn, .id = fsp->file_id,
+ };
if (fsp->oplock_type == LEASE_OPLOCK) {
state->client_guid = *fsp_client_guid(fsp);