[nextion] Remove assignment within if (#7824)

This commit is contained in:
Keith Burzinski 2024-11-25 02:22:50 -06:00 committed by GitHub
parent c49f7293fe
commit 7f75f2135d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
} }