diff options
author | Ron Yorston <rmy@pobox.com> | 2017-08-23 12:13:59 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2017-08-23 12:13:59 +0100 |
commit | d4dc5e4177056ae284c256278a853f51e347f13f (patch) | |
tree | ef6092b95b3e94cd90ece7cf865f662c09a63f86 | |
parent | 118e010f3fb0512776a28569b42ef66e6d6b3a8f (diff) | |
download | busybox-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.h | 2 | ||||
-rw-r--r-- | win32/env.c | 21 |
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 | ||
479 | char **copy_environ(const char *const *env); | ||
480 | void free_environ(char **env); | ||
481 | char **env_setenv(char **env, const char *name); | 479 | char **env_setenv(char **env, const char *name); |
482 | 480 | ||
483 | const char *get_busybox_exec_path(void); | 481 | 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 @@ | |||
1 | #include "libbb.h" | 1 | #include "libbb.h" |
2 | 2 | ||
3 | char **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 | |||
16 | void free_environ(char **env) | ||
17 | { | ||
18 | int i; | ||
19 | for (i = 0; env[i]; i++) | ||
20 | free(env[i]); | ||
21 | free(env); | ||
22 | } | ||
23 | |||
24 | static int lookup_env(char **env, const char *name, size_t nmln) | 3 | static int lookup_env(char **env, const char *name, size_t nmln) |
25 | { | 4 | { |
26 | int i; | 5 | int i; |