mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
Merge branch 'bugfix/fix_ble_config_error_log_in_first_use_nvs' into 'master'
bugfix: remove the error code when there is no file in the nvs in config.c See merge request espressif/esp-idf!7296
This commit is contained in:
@@ -545,6 +545,9 @@ static void config_parse(nvs_handle_t fp, config_t *config)
|
|||||||
char *keyname = osi_calloc(keyname_bufsz);
|
char *keyname = osi_calloc(keyname_bufsz);
|
||||||
int buf_size = get_config_size_from_flash(fp);
|
int buf_size = get_config_size_from_flash(fp);
|
||||||
char *buf = osi_calloc(buf_size);
|
char *buf = osi_calloc(buf_size);
|
||||||
|
if(buf_size == 0) { //First use nvs
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
if (!line || !section || !buf || !keyname) {
|
if (!line || !section || !buf || !keyname) {
|
||||||
err_code |= 0x01;
|
err_code |= 0x01;
|
||||||
goto error;
|
goto error;
|
||||||
|
Reference in New Issue
Block a user