From d4dc5e4177056ae284c256278a853f51e347f13f Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Wed, 23 Aug 2017 12:13:59 +0100 Subject: win32: remove unused functions The functions copy_environ and free_environ became unused following commit ac181bf54 "win32: simplify spawning applets". --- include/mingw.h | 2 -- win32/env.c | 21 --------------------- 2 files changed, 23 deletions(-) diff --git a/include/mingw.h b/include/mingw.h index 65cccab21..05e0b20fc 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -476,8 +476,6 @@ const char * next_path_sep(const char *path); * helpers */ -char **copy_environ(const char *const *env); -void free_environ(char **env); char **env_setenv(char **env, const char *name); const char *get_busybox_exec_path(void); diff --git a/win32/env.c b/win32/env.c index 48b86c555..eab3c1708 100644 --- a/win32/env.c +++ b/win32/env.c @@ -1,26 +1,5 @@ #include "libbb.h" -char **copy_environ(const char *const *envp) -{ - char **env; - int i = 0; - while (envp[i]) - i++; - env = xmalloc((i+1)*sizeof(*env)); - for (i = 0; envp[i]; i++) - env[i] = xstrdup(envp[i]); - env[i] = NULL; - return env; -} - -void free_environ(char **env) -{ - int i; - for (i = 0; env[i]; i++) - free(env[i]); - free(env); -} - static int lookup_env(char **env, const char *name, size_t nmln) { int i; -- cgit v1.2.3-55-g6feb