mirror of
https://github.com/esphome/esphome.git
synced 2024-12-10 14:45:56 +01:00
[nextion] Remove assignment within if
(#7824)
This commit is contained in:
parent
c49f7293fe
commit
7f75f2135d
@ -36,8 +36,8 @@ int Nextion::upload_by_chunks_(esp_http_client_handle_t http_client, uint32_t &r
|
|||||||
ESP_LOGV(TAG, "Requesting range: %s", range_header);
|
ESP_LOGV(TAG, "Requesting range: %s", range_header);
|
||||||
esp_http_client_set_header(http_client, "Range", range_header);
|
esp_http_client_set_header(http_client, "Range", range_header);
|
||||||
ESP_LOGV(TAG, "Opening HTTP connetion");
|
ESP_LOGV(TAG, "Opening HTTP connetion");
|
||||||
esp_err_t err;
|
esp_err_t err = esp_http_client_open(http_client, 0);
|
||||||
if ((err = esp_http_client_open(http_client, 0)) != ESP_OK) {
|
if (err != ESP_OK) {
|
||||||
ESP_LOGE(TAG, "Failed to open HTTP connection: %s", esp_err_to_name(err));
|
ESP_LOGE(TAG, "Failed to open HTTP connection: %s", esp_err_to_name(err));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user