Skip to content

Commit c167685

Browse files
committed
Match return value to type in available()
1 parent 908c526 commit c167685

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/arduino/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)