f_environ: cleanup/refactor

- use os_getenvname_at_index / os_getenv
- f_getenv: empty (*p == NUL) is not null (undefined)
This commit is contained in:
Daniel Hahler
2019-07-30 11:55:55 +02:00
committed by Justin M. Keyes
parent fd66ad2262
commit d55b12ea50
3 changed files with 24 additions and 41 deletions

View File

@@ -45,6 +45,7 @@ void env_init(void)
}
/// Like getenv(), but returns NULL if the variable is empty.
/// @see os_env_exists
const char *os_getenv(const char *name)
FUNC_ATTR_NONNULL_ALL
{