diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-08 10:51:20 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-12 09:54:56 +0200 |
commit | 8e8c61e786908b6aa3db647d06e09bf5ac331de9 (patch) | |
tree | b549c64a1c98dc6c12043b2fb1bfa50605aad184 /common/hush.c | |
parent | 9640c2b4a5f911a7ddd897df948ef2ffcb6723f5 (diff) | |
download | barebox-8e8c61e786908b6aa3db647d06e09bf5ac331de9.tar.gz barebox-8e8c61e786908b6aa3db647d06e09bf5ac331de9.tar.xz |
move simple_itoa to libbb so that others can use it
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/hush.c')
-rw-r--r-- | common/hush.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/common/hush.c b/common/hush.c index 77610bba7d..573bd3ef1d 100644 --- a/common/hush.c +++ b/common/hush.c @@ -121,6 +121,7 @@ #include <libbb.h> #include <glob.h> #include <getopt.h> +#include <libbb.h> #include <linux/list.h> /*cmd_boot.c*/ @@ -361,20 +362,6 @@ static int b_addqchr(o_string *o, int ch, int quote) return b_addchr(o, ch); } -/* belongs in utility.c */ -static char *simple_itoa(unsigned int i) -{ - /* 21 digits plus null terminator, good for 64-bit or smaller ints */ - static char local[22]; - char *p = &local[21]; - *p-- = '\0'; - do { - *p-- = '0' + i % 10; - i /= 10; - } while (i > 0); - return p + 1; -} - static int b_adduint(o_string *o, unsigned int i) { int r; |