aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2017-08-23 12:13:59 +0100
committerRon Yorston <rmy@pobox.com>2017-08-23 12:13:59 +0100
commitd4dc5e4177056ae284c256278a853f51e347f13f (patch)
treeef6092b95b3e94cd90ece7cf865f662c09a63f86
parent118e010f3fb0512776a28569b42ef66e6d6b3a8f (diff)
downloadbusybox-w32-d4dc5e4177056ae284c256278a853f51e347f13f.tar.gz
busybox-w32-d4dc5e4177056ae284c256278a853f51e347f13f.tar.bz2
busybox-w32-d4dc5e4177056ae284c256278a853f51e347f13f.zip
win32: remove unused functions
The functions copy_environ and free_environ became unused following commit ac181bf54 "win32: simplify spawning applets".
-rw-r--r--include/mingw.h2
-rw-r--r--win32/env.c21
2 files changed, 0 insertions, 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);
476 * helpers 476 * helpers
477 */ 477 */
478 478
479char **copy_environ(const char *const *env);
480void free_environ(char **env);
481char **env_setenv(char **env, const char *name); 479char **env_setenv(char **env, const char *name);
482 480
483const char *get_busybox_exec_path(void); 481const 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 @@
1#include "libbb.h" 1#include "libbb.h"
2 2
3char **copy_environ(const char *const *envp)
4{
5 char **env;
6 int i = 0;
7 while (envp[i])
8 i++;
9 env = xmalloc((i+1)*sizeof(*env));
10 for (i = 0; envp[i]; i++)
11 env[i] = xstrdup(envp[i]);
12 env[i] = NULL;
13 return env;
14}
15
16void free_environ(char **env)
17{
18 int i;
19 for (i = 0; env[i]; i++)
20 free(env[i]);
21 free(env);
22}
23
24static int lookup_env(char **env, const char *name, size_t nmln) 3static int lookup_env(char **env, const char *name, size_t nmln)
25{ 4{
26 int i; 5 int i;