Commit bd10da78 authored by Alexander Kartashov's avatar Alexander Kartashov Committed by Pavel Emelyanov

print_hex_l: don't print more than 8 hex digits on a 32-bit machine

This patch prevents compilation warnings about shift overflow on ARM.
Signed-off-by: 's avatarAlexander Kartashov <alekskartashov@parallels.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ae898912
......@@ -136,6 +136,7 @@ static void print_hex_l(unsigned long num)
hexdigit(num >> 24, &buf[11], &z);
hexdigit(num >> 28, &buf[10], &z);
#if BITS_PER_ULONG == 64
hexdigit(num >> 32, &buf[9], &z);
hexdigit(num >> 36, &buf[8], &z);
hexdigit(num >> 40, &buf[7], &z);
......@@ -144,6 +145,7 @@ static void print_hex_l(unsigned long num)
hexdigit(num >> 52, &buf[4], &z);
hexdigit(num >> 56, &buf[3], &z);
hexdigit(num >> 60, &buf[2], &z);
#endif
z -= 2;
z[0] = '0';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment