mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 22:48:10 +01:00
Use size_t for length parameter (#1799)
This commit is contained in:
parent
c5c24c1989
commit
3b18f1b87f
1 changed files with 2 additions and 2 deletions
|
@ -252,9 +252,9 @@ bool ESPPreferenceObject::load_internal_() {
|
||||||
|
|
||||||
char key[32];
|
char key[32];
|
||||||
sprintf(key, "%u", this->offset_);
|
sprintf(key, "%u", this->offset_);
|
||||||
uint32_t len = (this->length_words_ + 1) * 4;
|
size_t len = (this->length_words_ + 1) * 4;
|
||||||
|
|
||||||
uint32_t actual_len;
|
size_t actual_len;
|
||||||
esp_err_t err = nvs_get_blob(global_preferences.nvs_handle_, key, nullptr, &actual_len);
|
esp_err_t err = nvs_get_blob(global_preferences.nvs_handle_, key, nullptr, &actual_len);
|
||||||
if (err) {
|
if (err) {
|
||||||
ESP_LOGV(TAG, "nvs_get_blob('%s'): %s - the key might not be set yet", key, esp_err_to_name(err));
|
ESP_LOGV(TAG, "nvs_get_blob('%s'): %s - the key might not be set yet", key, esp_err_to_name(err));
|
||||||
|
|
Loading…
Reference in a new issue