forked from Archive/PX4-Autopilot
commander: Linting: Reduce scope of variable
This commit is contained in:
parent
772fce9f82
commit
8383603f76
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue