aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander/state_machine_helper.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-03-16 18:41:03 +0100
committerLorenz Meier <lm@inf.ethz.ch>2014-03-16 18:41:03 +0100
commit8383603f7691e3bc66534b58654c4d13547632a2 (patch)
treee1c0de8edfdd3451799392b8ccfe0f9e618aa0a1 /src/modules/commander/state_machine_helper.cpp
parent772fce9f82749bde8c14199fcc73cfa2235e760e (diff)
downloadpx4-firmware-8383603f7691e3bc66534b58654c4d13547632a2.tar.gz
px4-firmware-8383603f7691e3bc66534b58654c4d13547632a2.tar.bz2
px4-firmware-8383603f7691e3bc66534b58654c4d13547632a2.zip
commander: Linting: Reduce scope of variable
Diffstat (limited to 'src/modules/commander/state_machine_helper.cpp')
-rw-r--r--src/modules/commander/state_machine_helper.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/commander/state_machine_helper.cpp b/src/modules/commander/state_machine_helper.cpp
index 131d6a550..5537c4e80 100644
--- a/src/modules/commander/state_machine_helper.cpp
+++ b/src/modules/commander/state_machine_helper.cpp
@@ -337,10 +337,11 @@ int hil_state_transition(hil_state_t new_state, int status_pub, struct vehicle_s
/* list directory */
DIR *d;
- struct dirent *direntry;
d = opendir("/dev");
if (d) {
+ struct dirent *direntry;
+
while ((direntry = readdir(d)) != NULL) {
int sensfd = ::open(direntry->d_name, 0);