[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/2] qdev: Fix 32-bit compilation in print_si
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] qdev: Fix 32-bit compilation in print_size |
Date: |
Wed, 31 Jul 2013 09:46:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
Anthony,
Am 30.07.2013 20:20, schrieb Richard Henderson:
> Signed-off-by: Richard Henderson <address@hidden>
FWIW
Reviewed-by: Andreas Färber <address@hidden>
This is a build fix, can you please review and apply 1/2?
2/2 was outside my quick understanding so I'm not sure. ;)
rth, you forgot to mark it "for-1.6".
Regards,
Andreas
> ---
> hw/core/qdev-properties.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
> index 8d43a8d..d6d10c9 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]);
>
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg