diff --git a/src/main.c b/src/main.c index ee9130f..9727b6a 100644 --- a/src/main.c +++ b/src/main.c @@ -68,6 +68,7 @@ state_init(struct cav_state *state) return -1; } + memset(state, 0, sizeof(*state)); state->dir_fd = open(input_name, O_RDONLY); if (state->dir_fd < 0) { return -1; @@ -79,7 +80,6 @@ state_init(struct cav_state *state) return -1; } - state->pass_count = 0; return 0; }