summaryrefslogtreecommitdiff
path: root/hw/core
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-07-30 08:20:42 -1000
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-31 07:54:21 -0500
commite76c756fd3d3b652c6a65ebe16f2bfb25b8d025e (patch)
tree05c4d6b9913d95cad09634945b995571a06c2fe5 /hw/core
parent75e2a4baf1536682d111d9bee0261806737a32dc (diff)
downloadqemu-e76c756fd3d3b652c6a65ebe16f2bfb25b8d025e.tar.gz
qemu-e76c756fd3d3b652c6a65ebe16f2bfb25b8d025e.tar.bz2
qemu-e76c756fd3d3b652c6a65ebe16f2bfb25b8d025e.zip
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>
Diffstat (limited to 'hw/core')
-rw-r--r--hw/core/qdev-properties.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 8d43a8d272..d6d10c980e 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -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]);