aboutsummaryrefslogtreecommitdiff
path: root/miscutils/drop.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-04-23 09:00:04 +0100
committerRon Yorston <rmy@pobox.com>2023-04-23 09:04:01 +0100
commit0575aaaa0779812752427badbc0f80a09aac02a4 (patch)
tree350b636dad1766e43d1d0c7d132a895c3cc2a628 /miscutils/drop.c
parent7b81a44c87cf71dfb4f647ba107624e208ffbefe (diff)
downloadbusybox-w32-0575aaaa0779812752427badbc0f80a09aac02a4.tar.gz
busybox-w32-0575aaaa0779812752427badbc0f80a09aac02a4.tar.bz2
busybox-w32-0575aaaa0779812752427badbc0f80a09aac02a4.zip
win32: export xappendword()
Export the function xappendword() from make. Use it in drop and watch. Saves 8-80 bytes, an unusually large disparity.
Diffstat (limited to 'miscutils/drop.c')
-rw-r--r--miscutils/drop.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/miscutils/drop.c b/miscutils/drop.c
index db3d709d1..342de41d6 100644
--- a/miscutils/drop.c
+++ b/miscutils/drop.c
@@ -165,10 +165,8 @@ int drop_main(int argc, char **argv)
165 // Build the command line 165 // Build the command line
166 while (*a) { 166 while (*a) {
167 char *q = quote_arg(*a++); 167 char *q = quote_arg(*a++);
168 char *newcmd = xasprintf("%s %s", cmd, q); 168 cmd = xappendword(cmd, q);
169 free(q); 169 free(q);
170 free(cmd);
171 cmd = newcmd;
172 } 170 }
173 171
174 ZeroMemory(&si, sizeof(STARTUPINFO)); 172 ZeroMemory(&si, sizeof(STARTUPINFO));