Simplify condition check - remove redundant bufsize > 0 check

The bufsize > 0 check is redundant because the previous if statement
already handles all cases where bufsize <= 0, ensuring that by the time
we reach this condition, bufsize is always positive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Pascal Vizeli
2025-12-15 12:17:47 +00:00
parent c4d9ed7b70
commit 2dbaedbda2

View File

@@ -143,7 +143,7 @@ uint8_t OtaHttpRequestComponent::do_ota_() {
break;
}
if (bufsize > 0 && bufsize <= OtaHttpRequestComponent::HTTP_RECV_BUFFER) {
if (bufsize <= OtaHttpRequestComponent::HTTP_RECV_BUFFER) {
// add read bytes to MD5
md5_receive.add(buf, bufsize);