diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2018-03-07 09:39:52 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-03-21 12:23:02 +0100 |
commit | a3dcaba8a981a7a79303d8798df9d1c364506abc (patch) | |
tree | 7cf391123ed1cf6b690f69dfd7efa25170fdc521 /include/debug_ll.h | |
parent | bcc161d7dcdfbd09fdf15d78e11f09e13b9d27a8 (diff) | |
download | barebox-a3dcaba8a981a7a79303d8798df9d1c364506abc.tar.gz barebox-a3dcaba8a981a7a79303d8798df9d1c364506abc.tar.xz |
debug_ll: support 64bit longs
puthex_ll outputs an unsigned long, so print all digits in case unsigned
long is 64bit.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/debug_ll.h')
-rw-r--r-- | include/debug_ll.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/debug_ll.h b/include/debug_ll.h index b0eb7cd7d9..5047516399 100644 --- a/include/debug_ll.h +++ b/include/debug_ll.h @@ -42,7 +42,7 @@ static inline void puthex_ll(unsigned long value) { int i; unsigned char ch; - for (i = 8; i--; ) { + for (i = sizeof(unsigned long) * 2; i--; ) { ch = ((value >> (i * 4)) & 0xf); ch += (ch >= 10) ? 'a' - 10 : '0'; putc_ll(ch); |