From 7bb346f23c5f7a31f210fe95dcba093d0dc51571 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 6 Oct 2009 22:09:50 +0200 Subject: *: 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 --- runit/runsv.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'runit/runsv.c') 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) int p; const char *arg[4]; char exitcode[sizeof(int)*3 + 2]; - char sigcode[sizeof(int)*3 + 2]; if (s->state == S_FINISH) { /* Two arguments are given to ./finish. The first one is ./run exit code, @@ -324,13 +323,12 @@ static void startservice(struct svdir *s) arg[0] = "./finish"; arg[1] = "-1"; if (WIFEXITED(s->wstat)) { - sprintf(exitcode, "%u", (int) WEXITSTATUS(s->wstat)); + *utoa_to_buf(WEXITSTATUS(s->wstat), exitcode, sizeof(exitcode)) = '\0'; arg[1] = exitcode; } //arg[2] = "0"; //if (WIFSIGNALED(s->wstat)) { - sprintf(sigcode, "%u", (int) WTERMSIG(s->wstat)); - arg[2] = sigcode; + arg[2] = utoa(WTERMSIG(s->wstat)); //} arg[3] = NULL; } else { -- cgit v1.2.3