aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2024-06-24 14:17:29 +0100
committerRon Yorston <rmy@pobox.com>2024-06-24 14:17:29 +0100
commitedf4941735edb59845a10e7e48e708eebf37cad0 (patch)
tree425aab35812966a7092d3e1c582c80b61da9ca66
parentb07c177b446498ccd739b367f9e80337c3dfa55a (diff)
downloadbusybox-w32-edf4941735edb59845a10e7e48e708eebf37cad0.tar.gz
busybox-w32-edf4941735edb59845a10e7e48e708eebf37cad0.tar.bz2
busybox-w32-edf4941735edb59845a10e7e48e708eebf37cad0.zip
win32: code shrink exit_code_to_wait_status_cmd()
Saves 16 bytes.
-rw-r--r--win32/process.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/process.c b/win32/process.c
index 94a1e23a9..b69a1c02b 100644
--- a/win32/process.c
+++ b/win32/process.c
@@ -449,6 +449,7 @@ static int exit_code_to_wait_status_cmd(DWORD exit_code, const char *cmd)
449 DECLARE_PROC_ADDR(ULONG, RtlNtStatusToDosError, NTSTATUS); 449 DECLARE_PROC_ADDR(ULONG, RtlNtStatusToDosError, NTSTATUS);
450 DWORD flags, code; 450 DWORD flags, code;
451 char *msg = NULL; 451 char *msg = NULL;
452 const char *sep = ": ";
452 453
453 if (exit_code == 0xc0000005) 454 if (exit_code == 0xc0000005)
454 return SIGSEGV; 455 return SIGSEGV;
@@ -477,10 +478,9 @@ static int exit_code_to_wait_status_cmd(DWORD exit_code, const char *cmd)
477 } 478 }
478 } 479 }
479 480
480 if (cmd) 481 if (!cmd)
481 bb_error_msg("%s: %sError 0x%lx", cmd, msg ?: "", exit_code); 482 cmd = sep = "";
482 else 483 bb_error_msg("%s%s%sError 0x%lx", cmd, sep, msg ?: "", exit_code);
483 bb_error_msg("%s: %sError 0x%lx" + 4, msg ?: "", exit_code);
484 LocalFree(msg); 484 LocalFree(msg);
485 } 485 }
486 486