logger: move writer_thread variable into function (never accessed outside)

This commit is contained in:
Beat Küng
2016-10-07 14:46:13 +02:00
committed by Lorenz Meier
parent 14b0511c6c
commit c26e29d11c
+1 -1
View File
@@ -83,7 +83,6 @@ using namespace px4::logger;
static Logger *logger_ptr = nullptr;
static int logger_task = -1;
static pthread_t writer_thread;
/* This is used to schedule work for the logger (periodic scan for updated topics) */
static void timer_callback(void *arg)
@@ -638,6 +637,7 @@ void Logger::run()
PX4_ERR("init of writer failed (alloc failed)");
return;
}
pthread_t writer_thread;
int ret = _writer.thread_start(writer_thread);