diff --git a/docs/zh/api.md b/docs/zh/api.md index 299b96f..e3dd052 100644 --- a/docs/zh/api.md +++ b/docs/zh/api.md @@ -77,8 +77,8 @@ FlashErrCode flash_set_env(const char *key, const char *value) FlashErrCode flash_save_env(void) ``` -#### 1.2.6 恢复环境变量 -将内存中的环境变量表恢复为默认值。 +#### 1.2.6 重置环境变量 +将内存中的环境变量表重置为默认值。 ```C FlashErrCode flash_env_set_default(void) diff --git a/flash/src/flash_env.c b/flash/src/flash_env.c index 6d6e2d5..5d1d96f 100644 --- a/flash/src/flash_env.c +++ b/flash/src/flash_env.c @@ -394,7 +394,7 @@ FlashErrCode flash_del_env(const char *key){ } /** - * Set an environment variable. If it value is NULL, delete it. + * Set an environment variable. If it value is empty, delete it. * If not find it in environment variables table, then create it. * * @param key environment variable name @@ -407,7 +407,7 @@ FlashErrCode flash_set_env(const char *key, const char *value) { FLASH_ASSERT(env_cache); - /* if value is null, delete it */ + /* if ENV value is empty, delete it */ if (*value == NULL) { result = flash_del_env(key); } else { diff --git a/flash/src/flash_env_wl.c b/flash/src/flash_env_wl.c index 93d84eb..ed39c66 100644 --- a/flash/src/flash_env_wl.c +++ b/flash/src/flash_env_wl.c @@ -427,7 +427,7 @@ FlashErrCode flash_del_env(const char *key){ } /** - * Set an environment variable. If it value is NULL, delete it. + * Set an environment variable. If it value is empty, delete it. * If not find it in environment variables table, then create it. * * @param key environment variable name @@ -440,7 +440,7 @@ FlashErrCode flash_set_env(const char *key, const char *value) { FLASH_ASSERT(env_cache); - /* if value is null, delete it */ + /* if ENV value is empty, delete it */ if (*value == NULL) { result = flash_del_env(key); } else {