mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -05:00
Add memsets after allocation of all Backend implementors.
Now every struct that implements the Backend trait is completely cleared before we start initialising any of its fields. This will mean I can add new fields that default to 0 or NULL, without having to mess around initialising them explicitly everywhere.
This commit is contained in:
@ -156,6 +156,7 @@ static char *raw_init(const BackendVtable *vt, Seat *seat,
|
||||
char *loghost;
|
||||
|
||||
raw = snew(Raw);
|
||||
memset(raw, 0, sizeof(Raw));
|
||||
raw->plug.vt = &Raw_plugvt;
|
||||
raw->backend.vt = vt;
|
||||
raw->s = NULL;
|
||||
|
Reference in New Issue
Block a user