GCS_MAVLink: simplify sanity check

This commit is contained in:
Lucas De Marchi 2016-03-29 23:45:09 -03:00
parent d3e149e5d7
commit a502c0924c
1 changed files with 1 additions and 5 deletions

View File

@ -47,11 +47,7 @@ static inline bool valid_channel(mavlink_channel_t chan)
{ {
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare" #pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
if (chan >= MAVLINK_COMM_NUM_BUFFERS) { return chan < MAVLINK_COMM_NUM_BUFFERS;
return false;
}
return true;
#pragma clang diagnostic pop #pragma clang diagnostic pop
} }