mirror of https://github.com/ArduPilot/ardupilot
GCS_MAVLink: simplify sanity check
This commit is contained in:
parent
d3e149e5d7
commit
a502c0924c
|
@ -47,11 +47,7 @@ static inline bool valid_channel(mavlink_channel_t chan)
|
|||
{
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
|
||||
if (chan >= MAVLINK_COMM_NUM_BUFFERS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return chan < MAVLINK_COMM_NUM_BUFFERS;
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue