mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 11:53:39 +08:00
qdev: Fix 32-bit compilation in print_size
Signed-off-by: Richard Henderson <rth@twiddle.net> Message-id: 1375208443-17288-2-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
75e2a4baf1
commit
e76c756fd3
@ -1177,7 +1177,7 @@ static int print_size(DeviceState *dev, Property *prop, char *dest, size_t len)
|
||||
int i = 0;
|
||||
uint64_t div;
|
||||
|
||||
for (div = (long int)1 << 40; !(*ptr / div) ; div >>= 10) {
|
||||
for (div = 1ULL << 40; !(*ptr / div) ; div >>= 10) {
|
||||
i++;
|
||||
}
|
||||
return snprintf(dest, len, "%0.03f%c", (double)*ptr/div, suffixes[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user