summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-18 02:05:36 +0200
committerOndrej Zajicek (work) <santiago@crfreenet.org>2019-07-18 02:05:36 +0200
commit9d23aa7a80d397f882cf60ff9b04f330b81dc1f0 (patch)
treeda98b5ec6299594be0db5d06405e79399dd1a65f /lib
parentf9deedf1f045d1b64edaf2f27209e5227cce155a (diff)
Lib: Fix print of 64-bit router id
Mismatched types to printf(). The old code coincidentally worked on amd64 due to its calling conventions. Thanks to Maximilian Eschenbacher for the bugreport.
Diffstat (limited to 'lib')
-rw-r--r--lib/printf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/printf.c b/lib/printf.c
index 48b86a5f..be6a120e 100644
--- a/lib/printf.c
+++ b/lib/printf.c
@@ -314,14 +314,14 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args)
if(qualifier == 'l') {
X = va_arg(args, u64);
bsprintf(ipbuf, "%02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x",
- ((X >> 56) & 0xff),
- ((X >> 48) & 0xff),
- ((X >> 40) & 0xff),
- ((X >> 32) & 0xff),
- ((X >> 24) & 0xff),
- ((X >> 16) & 0xff),
- ((X >> 8) & 0xff),
- (X & 0xff));
+ (uint) ((X >> 56) & 0xff),
+ (uint) ((X >> 48) & 0xff),
+ (uint) ((X >> 40) & 0xff),
+ (uint) ((X >> 32) & 0xff),
+ (uint) ((X >> 24) & 0xff),
+ (uint) ((X >> 16) & 0xff),
+ (uint) ((X >> 8) & 0xff),
+ (uint) (X & 0xff));
}
else
{