mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-09 09:28:31 -04:00
AP_HAL_SITL: remove cast to signed type
... we're currently taking an unsigned type, casting it to a signed type and then comparing the result of that to an unsigned type. That's unhealthy.
This commit is contained in:
parent
fa3b3964e8
commit
4db9a5e6fe
@ -154,7 +154,7 @@ size_t UARTDriver::write(uint8_t c)
|
||||
|
||||
size_t UARTDriver::write(const uint8_t *buffer, size_t size)
|
||||
{
|
||||
if (txspace() <= (ssize_t)size) {
|
||||
if (txspace() <= size) {
|
||||
size = txspace();
|
||||
}
|
||||
if (size <= 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user