Skip to content

Commit 9a03d14

Browse files
committed
Match return value to type in available()
(Filtered from arduino/Arduino@f40e471)
1 parent 5106ad3 commit 9a03d14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/HardwareSerial.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ void HardwareSerial::end()
426426

427427
int HardwareSerial::available(void)
428428
{
429-
return (unsigned int)(SERIAL_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % SERIAL_BUFFER_SIZE;
429+
return (int)(SERIAL_BUFFER_SIZE + _rx_buffer->head - _rx_buffer->tail) % SERIAL_BUFFER_SIZE;
430430
}
431431

432432
int HardwareSerial::peek(void)

0 commit comments

Comments
 (0)