hush: unset_local_var_len is only used by unset_local_var

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2018-06-26 18:27:54 +02:00
parent b2b14cbd4c
commit 35a017c0c5

View File

@ -2333,6 +2333,7 @@ static void set_pwd_var(unsigned flag)
set_local_var(xasprintf("PWD=%s", get_cwd(/*force:*/ 1)), flag); set_local_var(xasprintf("PWD=%s", get_cwd(/*force:*/ 1)), flag);
} }
#if ENABLE_HUSH_UNSET || ENABLE_HUSH_GETOPTS
static int unset_local_var_len(const char *name, int name_len) static int unset_local_var_len(const char *name, int name_len)
{ {
struct variable *cur; struct variable *cur;
@ -2366,7 +2367,6 @@ static int unset_local_var_len(const char *name, int name_len)
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
#if ENABLE_HUSH_UNSET || ENABLE_HUSH_GETOPTS
static int unset_local_var(const char *name) static int unset_local_var(const char *name)
{ {
return unset_local_var_len(name, strlen(name)); return unset_local_var_len(name, strlen(name));