diff options
Diffstat (limited to 'win32/env.c')
-rw-r--r-- | win32/env.c | 21 |
1 files changed, 0 insertions, 21 deletions
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; |