]> granicus.if.org Git - esp-idf/commitdiff
component/bt: fix nvs_get_str_or_blob length output error
authorbaohongde <baohongde@espressif.com>
Thu, 31 Aug 2017 07:12:09 +0000 (15:12 +0800)
committerbaohongde <baohongde@espressif.com>
Fri, 8 Sep 2017 04:02:35 +0000 (12:02 +0800)
components/nvs_flash/src/nvs_api.cpp

index 9209657935186a5ab95f807cc365a99b5570a5ab..2bf156dea0d8a611f546e87a73ff2cb791169cfa 100644 (file)
@@ -400,11 +400,9 @@ static esp_err_t nvs_get_str_or_blob(nvs_handle handle, nvs::ItemType type, cons
     } else if (*length < dataSize) {
         *length = dataSize;
         return ESP_ERR_NVS_INVALID_LENGTH;
-    } else if (*length > dataSize) {
-       *length = dataSize;
     }
-    
 
+       *length = dataSize;
     return entry.mStoragePtr->readItem(entry.mNsIndex, type, key, out_value, dataSize);
 }