commander: Linting: Reduce scope of variable

This commit is contained in:
Lorenz Meier 2014-03-16 18:41:03 +01:00
parent 772fce9f82
commit 8383603f76
1 changed files with 2 additions and 1 deletions

View File

@ -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);