Merge pull request #1671 from PX4/ekf_fix

Critical coverity fixes.
This commit is contained in:
Lorenz Meier
2015-01-20 12:24:42 +01:00
4 changed files with 18 additions and 12 deletions
+6 -3
View File
@@ -1637,12 +1637,15 @@ sensor_reset(int ms)
fd = open(PX4FMU_DEVICE_PATH, O_RDWR);
if (fd < 0)
if (fd < 0) {
errx(1, "open fail");
}
if (ioctl(fd, GPIO_SENSOR_RAIL_RESET, ms) < 0)
err(1, "servo arm failed");
if (ioctl(fd, GPIO_SENSOR_RAIL_RESET, ms) < 0) {
warnx("sensor rail reset failed");
}
close(fd);
}
void