aboutsummaryrefslogtreecommitdiff
path: root/win32/process.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-03-22 09:26:14 +0000
committerRon Yorston <rmy@pobox.com>2018-03-22 09:26:14 +0000
commitb5c6c1e5506198d240dbc7f19caee8b95989aec3 (patch)
tree527f7060a2b852a2aed527b51a4037da31ca6c5d /win32/process.c
parent4e14b2a8e2dbe1987586468cb0c79313d0af08cd (diff)
downloadbusybox-w32-b5c6c1e5506198d240dbc7f19caee8b95989aec3.tar.gz
busybox-w32-b5c6c1e5506198d240dbc7f19caee8b95989aec3.tar.bz2
busybox-w32-b5c6c1e5506198d240dbc7f19caee8b95989aec3.zip
win32: small changes to reduce size of binary
Reduce the size of the binary by about 32 bytes: - use xzalloc to allocate static buffers so we don't have to initialise them; - avoid duplicated code in spawnveq.
Diffstat (limited to 'win32/process.c')
-rw-r--r--win32/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/process.c b/win32/process.c
index 0d6d70970..8842e0dee 100644
--- a/win32/process.c
+++ b/win32/process.c
@@ -211,11 +211,11 @@ spawnveq(int mode, const char *path, char *const *argv, char *const *env)
211 if (stat(path, &st) == 0) { 211 if (stat(path, &st) == 0) {
212 if (!S_ISREG(st.st_mode) || !(st.st_mode&S_IXUSR)) { 212 if (!S_ISREG(st.st_mode) || !(st.st_mode&S_IXUSR)) {
213 errno = EACCES; 213 errno = EACCES;
214 fprintf(stderr, "spawnveq: %s: %s\n", path, strerror(errno)); 214 goto error;
215 return -1;
216 } 215 }
217 } 216 }
218 else { 217 else {
218 error:
219 fprintf(stderr, "spawnveq: %s: %s\n", path, strerror(errno)); 219 fprintf(stderr, "spawnveq: %s: %s\n", path, strerror(errno));
220 return -1; 220 return -1;
221 } 221 }