Skip to content

Commit

Permalink
[mission] force struct to be initialized at 0
Browse files Browse the repository at this point in the history
  • Loading branch information
gautierhattenberger authored and fvantienen committed Aug 30, 2018
1 parent d89f489 commit 428fa38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sw/airborne/modules/mission/mission_common.c
Expand Up @@ -32,7 +32,7 @@
#include "subsystems/datalink/datalink.h"
#include "subsystems/datalink/downlink.h"

struct _mission mission;
struct _mission mission = { 0 };

void mission_init(void)
{
Expand All @@ -43,6 +43,7 @@ void mission_init(void)
// FIXME
// we have no guarantee that nav modules init are called after mission_init
// this would erase the already registered elements
// for now, rely on the static initialization
//for (int i = 0; i < MISSION_REGISTER_NB; i++) {
// mission.registered[i].cb = NULL;
// memset(mission.registered[i].type, '\0', MISSION_TYPE_SIZE);
Expand Down

0 comments on commit 428fa38

Please sign in to comment.