aboutsummaryrefslogtreecommitdiff
path: root/src/systemcmds/tests/test_adc.c
diff options
context:
space:
mode:
authorDaniel Agar <daniel@agar.ca>2015-03-27 19:08:44 -0400
committerDaniel Agar <daniel@agar.ca>2015-03-27 23:38:58 -0400
commit8aae66b893444c74a22ad7beb89e3828e0444108 (patch)
tree893833e818d8138360f8fa0bf5554dc6b036f369 /src/systemcmds/tests/test_adc.c
parent5cc1a5dfdae53626c3cdf35e3d7b60f1a4ca68ed (diff)
downloadpx4-firmware-8aae66b893444c74a22ad7beb89e3828e0444108.tar.gz
px4-firmware-8aae66b893444c74a22ad7beb89e3828e0444108.tar.bz2
px4-firmware-8aae66b893444c74a22ad7beb89e3828e0444108.zip
trivial code style cleanup round 2
Diffstat (limited to 'src/systemcmds/tests/test_adc.c')
-rw-r--r--src/systemcmds/tests/test_adc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemcmds/tests/test_adc.c b/src/systemcmds/tests/test_adc.c
index 9f6905239..ef12c9ad2 100644
--- a/src/systemcmds/tests/test_adc.c
+++ b/src/systemcmds/tests/test_adc.c
@@ -71,8 +71,9 @@ int test_adc(int argc, char *argv[])
/* read all channels available */
ssize_t count = read(fd, data, sizeof(data));
- if (count < 0)
+ if (count < 0) {
goto errout_with_dev;
+ }
unsigned channels = count / sizeof(data[0]);
@@ -88,7 +89,7 @@ int test_adc(int argc, char *argv[])
errout_with_dev:
- if (fd != 0) close(fd);
+ if (fd != 0) { close(fd); }
return OK;
}