mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-24 15:00:35 +08:00
clang-tidy: enable hicpp-braces-around-statements and fix
This commit is contained in:
@@ -1152,7 +1152,7 @@ void Logger::run()
|
||||
* And on linux this is quite accurate as well, but under NuttX it is not accurate,
|
||||
* because usleep() has only a granularity of CONFIG_MSEC_PER_TICK (=1ms).
|
||||
*/
|
||||
while (px4_sem_wait(&timer_callback_data.semaphore) != 0);
|
||||
while (px4_sem_wait(&timer_callback_data.semaphore) != 0) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ MavlinkFTP::_workList(PayloadHeader *payload, bool list_hidden)
|
||||
// move to the requested offset
|
||||
int requested_offset = payload->offset;
|
||||
|
||||
while (requested_offset-- > 0 && readdir(dp));
|
||||
while (requested_offset-- > 0 && readdir(dp)) {}
|
||||
|
||||
for (;;) {
|
||||
errno = 0;
|
||||
|
||||
@@ -289,7 +289,7 @@ MavlinkParametersManager::send(const hrt_abstime t)
|
||||
int i = 0;
|
||||
|
||||
// Send while burst is not exceeded, we still have buffer space and still something to send
|
||||
while ((i++ < max_num_to_send) && (_mavlink->get_free_tx_buf() >= get_size()) && send_params());
|
||||
while ((i++ < max_num_to_send) && (_mavlink->get_free_tx_buf() >= get_size()) && send_params()) {}
|
||||
}
|
||||
|
||||
bool
|
||||
|
||||
Reference in New Issue
Block a user