]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/env: fix function name remote_entry -> remove_entry
authorThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Sep 2023 17:34:03 +0000 (19:34 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 22 Sep 2023 18:30:12 +0000 (20:30 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
include/env.h
lib/env.c
text-utils/more.c

index 9a0ec4f9cf32db561222a77b6dd43b2edd77fe2c..9b29919507fef094c1a752229c1ca5e72a890092 100644 (file)
@@ -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;
index 2b3395c53b86d1e8a36715756562502e7d28dda0..2bdfe5697e900fdf0273ee83125ff60e2cb39918 100644 (file)
--- 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;
                 }
index 6026695fbca546981fafcbb22fc494d3fb684061..bdb34e0768c73f3ca7091d9cd654b19906d637e5 100644 (file)
@@ -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--;
                }
        }