From dffba3e03beefa867929eeb65cdb963627458db5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Fri, 24 Mar 2017 17:01:52 +0100 Subject: [PATCH] param: move variable definitions to the top of the file --- src/modules/systemlib/param/param.c | 6 +++--- src/modules/systemlib/param/param_shmem.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/systemlib/param/param.c b/src/modules/systemlib/param/param.c index 7800dde4cc..32c3025b5b 100644 --- a/src/modules/systemlib/param/param.c +++ b/src/modules/systemlib/param/param.c @@ -78,6 +78,9 @@ #include "px4_parameters.h" #include +static const char *param_default_file = PX4_ROOTFSDIR"/eeprom/parameters"; +static char *param_user_file = NULL; + #if 0 # define debug(fmt, args...) do { warnx(fmt, ##args); } while(0) @@ -883,9 +886,6 @@ param_reset_excludes(const char *excludes[], int num_excludes) _param_notify_changes(); } -static const char *param_default_file = PX4_ROOTFSDIR"/eeprom/parameters"; -static char *param_user_file = NULL; - int param_set_default_file(const char *filename) { diff --git a/src/modules/systemlib/param/param_shmem.c b/src/modules/systemlib/param/param_shmem.c index 390ce7c9be..2c4630b4f3 100644 --- a/src/modules/systemlib/param/param_shmem.c +++ b/src/modules/systemlib/param/param_shmem.c @@ -69,6 +69,13 @@ #include "shmem.h" +#ifdef __PX4_QURT +static const char *param_default_file = "/dev/fs/params"; +#else +static const char *param_default_file = "/usr/share/data/adsp/params"; +#endif +static char *param_user_file = NULL; + #define debug(fmt, args...) do { } while(0) #ifdef __PX4_QURT @@ -903,13 +910,6 @@ param_reset_excludes(const char *excludes[], int num_excludes) _param_notify_changes(); } -#ifdef __PX4_QURT -static const char *param_default_file = "/dev/fs/params"; -#else -static const char *param_default_file = "/usr/share/data/adsp/params"; -#endif -static char *param_user_file = NULL; - int param_set_default_file(const char *filename) {