stop using (yet another) static buffer
authorDenis Vlasenko <vda.linux@googlemail.com>
Wed, 14 Mar 2007 21:56:51 +0000 (21:56 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Wed, 14 Mar 2007 21:56:51 +0000 (21:56 -0000)
libbb/u_signal_names.c

index eb835e93632f84b89ae3a70e62806ee02975ca05..52861d40562e595ae5b450f2be6990dfc8fbd11b 100644 (file)
@@ -46,7 +46,6 @@ int get_signum(const char *name)
 const char *get_signame(int number)
 {
        int i;
-       static char buf[8];
 
        for (i=0; i < sizeof(signals) / sizeof(struct signal_name); i++) {
                if (number == signals[i].number) {
@@ -54,6 +53,5 @@ const char *get_signame(int number)
                }
        }
 
-       itoa_to_buf(number, buf, 8);
-       return buf;
+       return itoa(number);
 }