diff options
author | Ron Yorston <rmy@pobox.com> | 2018-03-29 14:48:16 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2018-03-29 14:48:16 +0100 |
commit | 0734c043f9c0bcefa1a259d26304a1ff69cacbf0 (patch) | |
tree | 17c8d368fffb062effb22202f8c3545ebd8bd3dc /libbb/appletlib.c | |
parent | 9c8ff33cb536d02e5f8626e16b58cf4b231fb404 (diff) | |
download | busybox-w32-0734c043f9c0bcefa1a259d26304a1ff69cacbf0.tar.gz busybox-w32-0734c043f9c0bcefa1a259d26304a1ff69cacbf0.tar.bz2 busybox-w32-0734c043f9c0bcefa1a259d26304a1ff69cacbf0.zip |
win32: save a few bytes
In the recently-added code to pass applet names to child processes use
local arrays to build the environment variables rather that allocating
them every time.
mingw_spawn can call mingw_spawn_proc instead of mingw_spawn_1.
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r-- | libbb/appletlib.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index 733d9ca12..ec6ad7ba8 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -993,9 +993,10 @@ void FAST_FUNC run_applet_no_and_exit(int applet_no, const char *name, char **ar | |||
993 | 993 | ||
994 | #if ENABLE_PLATFORM_MINGW32 | 994 | #if ENABLE_PLATFORM_MINGW32 |
995 | { | 995 | { |
996 | char *var = xasprintf("BB_APPLET_%d=%s", getpid(), applet_name); | 996 | char var[64]; |
997 | |||
998 | sprintf(var, "BB_APPLET_%d=%s", getpid(), applet_name); | ||
997 | putenv(var); | 999 | putenv(var); |
998 | free(var); | ||
999 | } | 1000 | } |
1000 | #endif | 1001 | #endif |
1001 | 1002 | ||