File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,7 @@ void am_ao_unsubscribe_all(const struct am_ao *ao) {
234234
235235void am_ao_ctor (struct am_ao * ao , struct am_hsm_state state ) {
236236 AM_ASSERT (ao );
237+ memset (ao , 0 , sizeof (* ao ));
237238 am_hsm_ctor (& ao -> hsm , state );
238239}
239240
Original file line number Diff line number Diff line change 3131
3232#include <stdbool.h>
3333#include <stddef.h>
34+ #include <string.h>
3435
3536#include "common/macros.h"
3637#include "fsm/fsm.h"
Original file line number Diff line number Diff line change 3939
4040#include <stdio.h>
4141#include <stdint.h>
42+ #include <string.h>
4243
4344#define _POSIX_C_SOURCE 200809L
4445
@@ -378,6 +379,8 @@ void am_pal_flush(void) { fflush(stdout); }
378379void am_pal_ctor (void ) {
379380 struct am_pal_task * task = & task_main_ ;
380381
382+ memset (task , 0 , sizeof (* task ));
383+
381384 task -> thread = pthread_self ();
382385 am_pal_mutex_init (& task -> mutex );
383386
You can’t perform that action at this time.
0 commit comments