diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-06 02:55:41 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-08-06 02:55:41 +0000 |
commit | e013475830b2399e31f5e17758dd6674b6b60058 (patch) | |
tree | ad53b26765c6f24e4994402c3a0be899f16219e0 /coreutils/env.c | |
parent | 84d71f33f5f0201e15bb07d523cef711cd8ef44f (diff) | |
download | busybox-w32-e013475830b2399e31f5e17758dd6674b6b60058.tar.gz busybox-w32-e013475830b2399e31f5e17758dd6674b6b60058.tar.bz2 busybox-w32-e013475830b2399e31f5e17758dd6674b6b60058.zip |
env: micro-optimization
printenv: fix "printenv VAR1 VAR2" bug (wasn't printing VAR2)
(spotted by kalyanatejaswi balabhadrapatruni <kalyanatejaswi@yahoo.co.in>)
env_main 267 260 -7
printenv_main 147 75 -72
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-79) Total: -79 bytes
text data bss dec hex filename
770336 1096 11228 782660 bf144 busybox_old
770256 1096 11228 782580 bf0f4 busybox_unstripped
Diffstat (limited to 'coreutils/env.c')
-rw-r--r-- | coreutils/env.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/coreutils/env.c b/coreutils/env.c index 31167d029..3008358ec 100644 --- a/coreutils/env.c +++ b/coreutils/env.c | |||
@@ -63,7 +63,7 @@ int env_main(int argc, char** argv) | |||
63 | if (opt & 1) { | 63 | if (opt & 1) { |
64 | cleanenv[0] = NULL; | 64 | cleanenv[0] = NULL; |
65 | environ = cleanenv; | 65 | environ = cleanenv; |
66 | } else if (opt & 2) { | 66 | } else { |
67 | while (unset_env) { | 67 | while (unset_env) { |
68 | unsetenv(unset_env->data); | 68 | unsetenv(unset_env->data); |
69 | unset_env = unset_env->link; | 69 | unset_env = unset_env->link; |