[uart] Change available() return type from int to size_t (#13893)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jonathan SwobodaandClaude Opus 4.6 authored and GitHub committed 2026-02-09 17:41:16 -05:00
1 parent 8f74b027b4
commit 475db750e0
21 files changed
+38 -34

No files matched your search

@@ -265,7 +265,7 @@ bool HostUartComponent::read_array(uint8_t *data, size_t len) {
return true;
}
int HostUartComponent::available() {
size_t HostUartComponent::available() {
if (this->file_descriptor_ == -1) {
return 0;
}
@@ -275,9 +275,10 @@ int HostUartComponent::available() {
this->update_error_(strerror(errno));
return 0;
}
size_t result = available;
if (this->has_peek_)
available++;
return available;
result++;
return result;
};
void HostUartComponent::flush() {