mirror of
https://github.com/esphome/esphome.git
synced 2026-02-18 23:45:40 -07:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user