diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-30 12:19:44 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-06-30 12:19:44 +0200 |
commit | ee8f4dcee639effe982bbb099a6f86f7c4fce5e0 (patch) | |
tree | 50f6b8e77c84cfa1570c97efea219b17695e2752 /src/systemcmds/pwm | |
parent | 3f6851b9879c2e4d764926a3bc29ff800a17b73d (diff) | |
download | px4-firmware-ee8f4dcee639effe982bbb099a6f86f7c4fce5e0.tar.gz px4-firmware-ee8f4dcee639effe982bbb099a6f86f7c4fce5e0.tar.bz2 px4-firmware-ee8f4dcee639effe982bbb099a6f86f7c4fce5e0.zip |
systemcmds: Warning fixes
Diffstat (limited to 'src/systemcmds/pwm')
-rw-r--r-- | src/systemcmds/pwm/pwm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/systemcmds/pwm/pwm.c b/src/systemcmds/pwm/pwm.c index 1828c660f..e0e6ca537 100644 --- a/src/systemcmds/pwm/pwm.c +++ b/src/systemcmds/pwm/pwm.c @@ -515,7 +515,8 @@ pwm_main(int argc, char *argv[]) ret = poll(&fds, 1, 0); if (ret > 0) { - int ret = read(0, &c, 1); + ret = read(0, &c, 1); + if (ret > 0) { /* reset output to the last value */ for (unsigned i = 0; i < servo_count; i++) { |