From: Thomas Weißschuh Date: Fri, 22 Sep 2023 17:34:03 +0000 (+0200) Subject: lib/env: fix function name remote_entry -> remove_entry X-Git-Tag: v2.40-rc1~233^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5e2bc9d62813293037afaf072ae0d9060b20afce;p=thirdparty%2Futil-linux.git lib/env: fix function name remote_entry -> remove_entry Signed-off-by: Thomas Weißschuh --- diff --git a/include/env.h b/include/env.h index 9a0ec4f9cf..9b29919507 100644 --- a/include/env.h +++ b/include/env.h @@ -30,7 +30,7 @@ static inline void xsetenv(char const *name, char const *val, int overwrite) err(XSETENV_EXIT_CODE, _("failed to set the %s environment variable"), name); } -static inline int remote_entry(char **argv, int remove, int last) +static inline int remove_entry(char **argv, int remove, int last) { memmove(argv + remove, argv + remove + 1, sizeof(char *) * (last - remove)); return last - 1; diff --git a/lib/env.c b/lib/env.c index 2b3395c53b..2bdfe5697e 100644 --- a/lib/env.c +++ b/lib/env.c @@ -159,7 +159,7 @@ void __sanitize_env(struct ul_env_list **org) if (strncmp(*cur, *bad, strlen(*bad)) == 0) { if (org) *org = env_list_add(*org, *cur); - last = remote_entry(envp, cur - envp, last); + last = remove_entry(envp, cur - envp, last); cur--; break; } @@ -174,7 +174,7 @@ void __sanitize_env(struct ul_env_list **org) continue; /* OK */ if (org) *org = env_list_add(*org, *cur); - last = remote_entry(envp, cur - envp, last); + last = remove_entry(envp, cur - envp, last); cur--; break; } diff --git a/text-utils/more.c b/text-utils/more.c index 6026695fbc..bdb34e0768 100644 --- a/text-utils/more.c +++ b/text-utils/more.c @@ -298,7 +298,7 @@ static void argscan(struct more_control *ctl, int as_argc, char **as_argv) } } if (move) { - as_argc = remote_entry(as_argv, opt, as_argc); + as_argc = remove_entry(as_argv, opt, as_argc); opt--; } }