summaryrefslogtreecommitdiff
path: root/lib/vsprintf.c
diff options
context:
space:
mode:
authorStefano Babic <sbabic@denx.de>2014-08-08 10:18:40 +0200
committerStefano Babic <sbabic@denx.de>2014-08-08 10:18:40 +0200
commitc23154aab5825fec81d5500c53eaa686646c76b5 (patch)
tree32b0aafae49f664a65ced50981492bb031f006b8 /lib/vsprintf.c
parentcb07d74e2e0c0a41533b6bcd551af9bf2ebcf2bc (diff)
parent9d195a546179bc732aba9eacccf0a9a3db591288 (diff)
downloadu-boot-imx-c23154aab5825fec81d5500c53eaa686646c76b5.zip
u-boot-imx-c23154aab5825fec81d5500c53eaa686646c76b5.tar.gz
u-boot-imx-c23154aab5825fec81d5500c53eaa686646c76b5.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-arm
Diffstat (limited to 'lib/vsprintf.c')
-rw-r--r--lib/vsprintf.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index 60874da..7ec758e 100644
--- a/lib/vsprintf.c
+++ b/lib/vsprintf.c
@@ -28,17 +28,6 @@
/* some reluctance to put this into a new limits.h, so it is here */
#define INT_MAX ((int)(~0U>>1))
-static const char hex_asc[] = "0123456789abcdef";
-#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
-#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4]
-
-static inline char *pack_hex_byte(char *buf, u8 byte)
-{
- *buf++ = hex_asc_hi(byte);
- *buf++ = hex_asc_lo(byte);
- return buf;
-}
-
unsigned long simple_strtoul(const char *cp, char **endp,
unsigned int base)
{
@@ -434,6 +423,17 @@ static char *string(char *buf, char *end, char *s, int field_width,
}
#ifdef CONFIG_CMD_NET
+static const char hex_asc[] = "0123456789abcdef";
+#define hex_asc_lo(x) hex_asc[((x) & 0x0f)]
+#define hex_asc_hi(x) hex_asc[((x) & 0xf0) >> 4]
+
+static inline char *pack_hex_byte(char *buf, u8 byte)
+{
+ *buf++ = hex_asc_hi(byte);
+ *buf++ = hex_asc_lo(byte);
+ return buf;
+}
+
static char *mac_address_string(char *buf, char *end, u8 *addr, int field_width,
int precision, int flags)
{