diff options
author | Richard Henderson | 2013-07-30 20:20:42 +0200 |
---|---|---|
committer | Anthony Liguori | 2013-07-31 14:54:21 +0200 |
commit | e76c756fd3d3b652c6a65ebe16f2bfb25b8d025e (patch) | |
tree | 05c4d6b9913d95cad09634945b995571a06c2fe5 /hw/core | |
parent | Merge remote-tracking branch 'spice/spice.v72' into staging (diff) | |
download | qemu-e76c756fd3d3b652c6a65ebe16f2bfb25b8d025e.tar.gz qemu-e76c756fd3d3b652c6a65ebe16f2bfb25b8d025e.tar.xz 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.c | 2 |
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]); |