From 1aeca4f64d8052c48d0b8d1eb861139a1db0eb2f Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Mon, 23 Nov 2015 23:09:10 -0800 Subject: [PATCH] Fixed code format and removed unused std::list Signed-off-by: Mark Charlebois --- src/platforms/posix/drivers/accelsim/accelsim.cpp | 4 +++- src/platforms/posix/px4_layer/px4_sem.cpp | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/platforms/posix/drivers/accelsim/accelsim.cpp b/src/platforms/posix/drivers/accelsim/accelsim.cpp index 658eab6e0e..b15a9c08c9 100644 --- a/src/platforms/posix/drivers/accelsim/accelsim.cpp +++ b/src/platforms/posix/drivers/accelsim/accelsim.cpp @@ -766,6 +766,7 @@ ACCELSIM::start() //PX4_INFO("ACCELSIM::start"); /* make sure we are stopped first */ int ret = stop(); + if (ret != 0) { PX4_ERR("ACCELSIM::start stop failed"); } @@ -775,9 +776,11 @@ ACCELSIM::start() _mag_reports->flush(); int ret2 = VirtDevObj::start(); + if (ret2 != 0) { PX4_ERR("ACCELSIM::start base class start failed"); } + return (ret != 0 || ret2 != 0) ? -1 : 0; } @@ -785,7 +788,6 @@ int ACCELSIM::stop() { //PX4_INFO("ACCELSIM::stop"); - //PX4_BACKTRACE(); return VirtDevObj::stop(); } diff --git a/src/platforms/posix/px4_layer/px4_sem.cpp b/src/platforms/posix/px4_layer/px4_sem.cpp index 479922f2c1..84795eb16a 100644 --- a/src/platforms/posix/px4_layer/px4_sem.cpp +++ b/src/platforms/posix/px4_layer/px4_sem.cpp @@ -48,8 +48,6 @@ #include -#include - int px4_sem_init(px4_sem_t *s, int pshared, unsigned value) { // We do not used the process shared arg