aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/mavlink/mavlink_messages.cpp6
-rw-r--r--src/systemcmds/ver/ver.c3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/modules/mavlink/mavlink_messages.cpp b/src/modules/mavlink/mavlink_messages.cpp
index b4911427f..bed915bbe 100644
--- a/src/modules/mavlink/mavlink_messages.cpp
+++ b/src/modules/mavlink/mavlink_messages.cpp
@@ -382,11 +382,11 @@ protected:
clock_gettime(CLOCK_REALTIME, &ts);
/* use GPS time for log file naming, e.g. /fs/microsd/2014-01-19/19_37_52.bin */
time_t gps_time_sec = ts.tv_sec + (ts.tv_nsec / 1e9);
- struct tm t;
- gmtime_r(&gps_time_sec, &t);
+ struct tm tt;
+ gmtime_r(&gps_time_sec, &tt);
// XXX we do not want to interfere here with the SD log app
- strftime(log_file_name, sizeof(log_file_name), "msgs_%Y_%m_%d_%H_%M_%S.txt", &t);
+ strftime(log_file_name, sizeof(log_file_name), "msgs_%Y_%m_%d_%H_%M_%S.txt", &tt);
snprintf(log_file_path, sizeof(log_file_path), "/fs/microsd/%s", log_file_name);
fp = fopen(log_file_path, "ab");
}
diff --git a/src/systemcmds/ver/ver.c b/src/systemcmds/ver/ver.c
index 55cec149f..c794f5819 100644
--- a/src/systemcmds/ver/ver.c
+++ b/src/systemcmds/ver/ver.c
@@ -126,7 +126,6 @@ int ver_main(int argc, char *argv[])
if (chip_version < 0) {
printf("UNKNOWN MCU\n");
- ret = 1;
} else {
printf("MCU: %s, rev. %c\n", revstr, rev);
@@ -142,7 +141,7 @@ int ver_main(int argc, char *argv[])
ret = 0;
}
- if (ret = 1) {
+ if (ret == 1) {
errx(1, "unknown command.\n");
}