diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-06 22:09:50 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-10-06 22:09:50 +0200 |
commit | 7bb346f23c5f7a31f210fe95dcba093d0dc51571 (patch) | |
tree | 2239fc7d76b743ada2f8836a3722f36a3981eee3 /runit | |
parent | 8d680b51148b9cbe7dd3afd37022f3390dd999ef (diff) | |
download | busybox-w32-7bb346f23c5f7a31f210fe95dcba093d0dc51571.tar.gz busybox-w32-7bb346f23c5f7a31f210fe95dcba093d0dc51571.tar.bz2 busybox-w32-7bb346f23c5f7a31f210fe95dcba093d0dc51571.zip |
*: use {i,u}toa() where appropriate
function old new delta
startservice 377 363 -14
setari_u 54 40 -14
ash_main 1375 1361 -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-42) Total: -42 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'runit')
-rw-r--r-- | runit/runsv.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/runit/runsv.c b/runit/runsv.c index 4dfdd3dc1..8b787543f 100644 --- a/runit/runsv.c +++ b/runit/runsv.c | |||
@@ -311,7 +311,6 @@ static void startservice(struct svdir *s) | |||
311 | int p; | 311 | int p; |
312 | const char *arg[4]; | 312 | const char *arg[4]; |
313 | char exitcode[sizeof(int)*3 + 2]; | 313 | char exitcode[sizeof(int)*3 + 2]; |
314 | char sigcode[sizeof(int)*3 + 2]; | ||
315 | 314 | ||
316 | if (s->state == S_FINISH) { | 315 | if (s->state == S_FINISH) { |
317 | /* Two arguments are given to ./finish. The first one is ./run exit code, | 316 | /* Two arguments are given to ./finish. The first one is ./run exit code, |
@@ -324,13 +323,12 @@ static void startservice(struct svdir *s) | |||
324 | arg[0] = "./finish"; | 323 | arg[0] = "./finish"; |
325 | arg[1] = "-1"; | 324 | arg[1] = "-1"; |
326 | if (WIFEXITED(s->wstat)) { | 325 | if (WIFEXITED(s->wstat)) { |
327 | sprintf(exitcode, "%u", (int) WEXITSTATUS(s->wstat)); | 326 | *utoa_to_buf(WEXITSTATUS(s->wstat), exitcode, sizeof(exitcode)) = '\0'; |
328 | arg[1] = exitcode; | 327 | arg[1] = exitcode; |
329 | } | 328 | } |
330 | //arg[2] = "0"; | 329 | //arg[2] = "0"; |
331 | //if (WIFSIGNALED(s->wstat)) { | 330 | //if (WIFSIGNALED(s->wstat)) { |
332 | sprintf(sigcode, "%u", (int) WTERMSIG(s->wstat)); | 331 | arg[2] = utoa(WTERMSIG(s->wstat)); |
333 | arg[2] = sigcode; | ||
334 | //} | 332 | //} |
335 | arg[3] = NULL; | 333 | arg[3] = NULL; |
336 | } else { | 334 | } else { |