diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2019-05-27 22:52:57 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-05-28 10:18:14 +0200 |
commit | faf2ad1dc5a1a3fb131559c26675cecdd20b74a8 (patch) | |
tree | 037a0f2deb846207d0db6468e2d85338211c8ee0 /lib | |
parent | 8f945131a18e68121f6e7ea4c12992a5eb108466 (diff) | |
download | barebox-faf2ad1dc5a1a3fb131559c26675cecdd20b74a8.tar.gz barebox-faf2ad1dc5a1a3fb131559c26675cecdd20b74a8.tar.xz |
libbb: Drop simple_itoa()
Hush is the only one user of simple_itoa() and the code there can be
re-implemented using snprintf(). Change the code to get rid of
simple_itoa().
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libbb.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/libbb.c b/lib/libbb.c index 239611c27b..d0c9bf4d80 100644 --- a/lib/libbb.c +++ b/lib/libbb.c @@ -112,17 +112,3 @@ char * safe_strncpy(char *dst, const char *src, size_t size) return strncpy(dst, src, size); } EXPORT_SYMBOL(safe_strncpy); - -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; -} -EXPORT_SYMBOL(simple_itoa); |