core: state: Ensure compiler FSM to zeroed

Signed-off-by: Chloe M. <chloe@mirocom.org>
This commit is contained in:
2026-05-23 18:08:17 -04:00
parent 833978f414
commit dba31ae0ad
+1 -1
View File
@@ -18,6 +18,7 @@ state_init(struct cescal_state *state, const char *pathname)
return -1; return -1;
} }
memset(state, 0, sizeof(*state));
state->in_fd = open(pathname, O_RDONLY); state->in_fd = open(pathname, O_RDONLY);
if (state->in_fd < 0) { if (state->in_fd < 0) {
return -1; return -1;
@@ -38,7 +39,6 @@ state_init(struct cescal_state *state, const char *pathname)
return -1; return -1;
} }
state->pass = 0;
return 0; return 0;
} }