summaryrefslogtreecommitdiffhomepage
path: root/networking/tcpudp.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-12-30 05:05:31 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-12-30 05:05:31 +0000
commit76ddc2e3e4837d0557fb6626394f87648e5f8c3b (patch)
treef545fe36c1ebc20c743ab28bc0df2b0f1d28b59d /networking/tcpudp.c
parentd6e8f9450cf055f0abfa424c5aa9e5a7c30d6593 (diff)
libbb: add bb_unsetenv (taken from hush).
udhcpc: stop filtering environment passed to the script. crond: fix uncovered potential bug (failing unsetenv) mdev: fix uncovered potential bug (failing unsetenv) tcp, udpsvd: fix uncovered potential bug (failing unsetenv) function old new delta safe_setenv - 58 +58 bb_unsetenv - 55 +55 builtin_unset 139 138 -1 tcpudpsvd_main 1843 1830 -13 free_strings_and_unsetenv 87 53 -34 udhcp_run_script 1186 1133 -53 safe_setenv4 62 - -62 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 0/4 up/down: 113/-163) Total: -50 bytes
Diffstat (limited to 'networking/tcpudp.c')
-rw-r--r--networking/tcpudp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/networking/tcpudp.c b/networking/tcpudp.c
index 3b73f213f..55a3e0899 100644
--- a/networking/tcpudp.c
+++ b/networking/tcpudp.c
@@ -85,8 +85,7 @@ static void undo_xsetenv(void)
char **pp = env_cur = &env_var[0];
while (*pp) {
char *var = *pp;
- *strchrnul(var, '=') = '\0';
- unsetenv(var);
+ bb_unsetenv(var);
free(var);
*pp++ = NULL;
}