From d733b0b516aecbef895f643fd30a256629c8801a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 29 Apr 2026 12:29:38 -0500 Subject: [PATCH] replace c-casts --- esphome/components/ota/ota_backend_esp_idf.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esphome/components/ota/ota_backend_esp_idf.cpp b/esphome/components/ota/ota_backend_esp_idf.cpp index 141cfcdeab..70a2d14aae 100644 --- a/esphome/components/ota/ota_backend_esp_idf.cpp +++ b/esphome/components/ota/ota_backend_esp_idf.cpp @@ -280,7 +280,8 @@ OTAResponseTypes IDFOTABackend::update_partition_table() { // Found the otadata partition in the new partition table otadata_partition_found = true; otadata_overlap = check_overlap(running_app_offset, running_app_size, new_part->pos.offset, new_part->pos.size); - } else if (new_part->subtype == ESP_PARTITION_SUBTYPE_DATA_NVS && strcmp((char *) new_part->label, "nvs") == 0) { + } else if (new_part->subtype == ESP_PARTITION_SUBTYPE_DATA_NVS && + strncmp(reinterpret_cast(new_part->label), "nvs", sizeof(new_part->label)) == 0) { // Found the nvs partition in the new partition table nvs_partition_found = true; }