Use size_t for length parameter (#1799)

This commit is contained in:
André Klitzing 2021-06-03 00:11:41 +02:00 committed by GitHub
parent c5c24c1989
commit 3b18f1b87f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -252,9 +252,9 @@ bool ESPPreferenceObject::load_internal_() {
char key[32];
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);
if (err) {
ESP_LOGV(TAG, "nvs_get_blob('%s'): %s - the key might not be set yet", key, esp_err_to_name(err));