Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ void HardwareSerial::end()
426426

427427
int HardwareSerial::available(void)
428428
{
429-
return (unsignedint)(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)

AltStyle によって変換されたページ (->オリジナル) /