diff options
Diffstat (limited to 'coreutils/env.c')
-rw-r--r-- | coreutils/env.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/coreutils/env.c b/coreutils/env.c index eb1f0b268..4cdbeae6a 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -29,14 +29,9 @@ | |||
29 | * - use bb_default_error_retval | 29 | * - use bb_default_error_retval |
30 | */ | 30 | */ |
31 | 31 | ||
32 | 32 | #include "busybox.h" | |
33 | #include <stdio.h> | ||
34 | #include <string.h> | ||
35 | #include <stdlib.h> | ||
36 | #include <errno.h> | 33 | #include <errno.h> |
37 | #include <unistd.h> | ||
38 | #include <getopt.h> /* struct option */ | 34 | #include <getopt.h> /* struct option */ |
39 | #include "busybox.h" | ||
40 | 35 | ||
41 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS | 36 | #if ENABLE_FEATURE_ENV_LONG_OPTIONS |
42 | static const struct option env_long_options[] = { | 37 | static const struct option env_long_options[] = { |
@@ -50,7 +45,7 @@ int env_main(int argc, char** argv) | |||
50 | { | 45 | { |
51 | static char *cleanenv[1] = { NULL }; | 46 | static char *cleanenv[1] = { NULL }; |
52 | 47 | ||
53 | char **ep, *p; | 48 | char **ep; |
54 | unsigned long opt; | 49 | unsigned long opt; |
55 | llist_t *unset_env = NULL; | 50 | llist_t *unset_env = NULL; |
56 | extern char **environ; | 51 | extern char **environ; |
@@ -77,7 +72,7 @@ int env_main(int argc, char** argv) | |||
77 | } | 72 | } |
78 | } | 73 | } |
79 | 74 | ||
80 | while (*argv && ((p = strchr(*argv, '=')) != NULL)) { | 75 | while (*argv && (strchr(*argv, '=') != NULL)) { |
81 | if (putenv(*argv) < 0) { | 76 | if (putenv(*argv) < 0) { |
82 | bb_perror_msg_and_die("putenv"); | 77 | bb_perror_msg_and_die("putenv"); |
83 | } | 78 | } |