diff options
author | Denys Vlasenko | 2023-06-17 21:02:37 +0200 |
---|---|---|
committer | Denys Vlasenko | 2023-06-17 21:13:13 +0200 |
commit | 96769486e20fd5f1142cae0db2cbacef31dc75e9 (patch) | |
tree | f40b504f812eda9787084aaaf377fe1a144466d0 /shell/ash.c | |
parent | d0441222db80c6fc0c47fa014106d38e25bfada7 (diff) | |
download | busybox-96769486e20fd5f1142cae0db2cbacef31dc75e9.zip busybox-96769486e20fd5f1142cae0db2cbacef31dc75e9.tar.gz |
shell: move varcmp() to shell_common.h and use it in hush
function old new delta
unset_local_var - 112 +112
findvar 31 35 +4
set_vars_and_save_old 144 141 -3
helper_export_local 235 230 -5
set_local_var 425 416 -9
handle_changed_special_names 38 27 -11
builtin_unset 154 141 -13
builtin_getopts 404 391 -13
get_local_var_value 281 260 -21
get_ptr_to_local_var 71 45 -26
unset_local_var_len 139 - -139
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/8 up/down: 116/-240) Total: -124 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r-- | shell/ash.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/shell/ash.c b/shell/ash.c index dde36dd..96d2433 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2260,30 +2260,6 @@ getoptsreset(const char *value) #endif /* - * Compares two strings up to the first = or '\0'. The first - * string must be terminated by '='; the second may be terminated by - * either '=' or '\0'. - */ -static int -varcmp(const char *p, const char *q) -{ - int c, d; - - while ((c = *p) == (d = *q)) { - if (c == '\0' || c == '=') - goto out; - p++; - q++; - } - if (c == '=') - c = '\0'; - if (d == '=') - d = '\0'; - out: - return c - d; -} - -/* * Find the appropriate entry in the hash table from the name. */ static struct var ** |