diff --git a/src/app_config.c b/src/app_config.c index ed828771..8f7e6812 100644 --- a/src/app_config.c +++ b/src/app_config.c @@ -1,6 +1,6 @@ #include "app_config.h" -const char *appconf_paths[] = {"./divinus.yaml", "/etc/divinus.yaml"}; +const char *appconf_paths[] = {"./divinus.yaml", "/etc/divinus.yaml", NULL}; struct AppConfig app_config; diff --git a/src/gpio.c b/src/gpio.c index cb19919d..65e07628 100644 --- a/src/gpio.c +++ b/src/gpio.c @@ -12,7 +12,7 @@ void gpio_deinit(void) { } int gpio_init(void) { - const char *paths[] = {"/dev/gpiochip0", "/sys/class/gpio/gpiochip0"}; + const char *paths[] = {"/dev/gpiochip0", "/sys/class/gpio/gpiochip0", NULL}; const char **path = paths; while (*path) { if (access(*path++, F_OK)) continue; diff --git a/src/watchdog.c b/src/watchdog.c index 18206898..1db88774 100644 --- a/src/watchdog.c +++ b/src/watchdog.c @@ -9,7 +9,7 @@ void watchdog_reset(void) { int watchdog_start(int timeout) { if (fd) return EXIT_SUCCESS; - const char* paths[] = {"/dev/watchdog0", "/dev/watchdog"}; + const char* paths[] = {"/dev/watchdog0", "/dev/watchdog", NULL}; const char **path = paths; while (*path) {