altos: Only try to erase log if HAS_LOG is set
authorKeith Packard <keithp@keithp.com>
Thu, 9 Apr 2020 00:22:49 +0000 (17:22 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 9 Apr 2020 00:25:33 +0000 (17:25 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_config.c

index bd2e95ef6a56f1feeb260beb410f527482f092a8..e4fc73c99059aadac5c7e9360f702a43770fb7d6 100644 (file)
@@ -86,7 +86,7 @@ _ao_config_put(void)
        ao_config_setup();
        ao_config_erase();
        ao_config_write(0, &ao_config, sizeof (ao_config));
-#if HAS_FLIGHT
+#if HAS_FLIGHT && HAS_LOG
        ao_log_write_erase(0);
 #endif
        ao_config_flush();