basic/env-util: make function shorter

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2020-10-23 13:49:05 +02:00
parent 17d99f95c2
commit 451ae5a11a
1 changed files with 1 additions and 4 deletions

View File

@ -52,10 +52,7 @@ static bool env_name_is_valid_n(const char *e, size_t n) {
}
bool env_name_is_valid(const char *e) {
if (!e)
return false;
return env_name_is_valid_n(e, strlen(e));
return env_name_is_valid_n(e, strlen_ptr(e));
}
bool env_value_is_valid(const char *e) {