mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 14:23:36 +08:00
trivial code style cleanup round 2
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,8 @@ int test_hott_telemetry(int argc, char *argv[])
|
||||
warnx("PASS: Received %d out of %d valid byte pairs from the HoTT receiver device.", received_count, max_polls);
|
||||
|
||||
} else {
|
||||
warnx("WARN: Received %d out of %d byte pairs of which %d were valid from the HoTT receiver device.", received_count, max_polls, valid_count);
|
||||
warnx("WARN: Received %d out of %d byte pairs of which %d were valid from the HoTT receiver device.", received_count,
|
||||
max_polls, valid_count);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -146,8 +146,9 @@ int test_uart_baudchange(int argc, char *argv[])
|
||||
/* uart2 -> */
|
||||
r = write(uart2, sample_uart2, sizeof(sample_uart2));
|
||||
|
||||
if (r > 0)
|
||||
if (r > 0) {
|
||||
uart2_nwrite += r;
|
||||
}
|
||||
}
|
||||
|
||||
close(uart2);
|
||||
|
||||
Reference in New Issue
Block a user