[Spice-devel] [PATCH 1/3] server/main_channel: use PRIu64 where needed

Marc-André Lureau marcandre.lureau at gmail.com
Thu Nov 10 06:50:52 PST 2011


ack the 3

On Thu, Nov 10, 2011 at 3:30 PM, Alon Levy <alevy at redhat.com> wrote:
> ---
>  server/main_channel.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/server/main_channel.c b/server/main_channel.c
> index 24cdaea..0ce3b48 100644
> --- a/server/main_channel.c
> +++ b/server/main_channel.c
> @@ -19,6 +19,7 @@
>  #include <config.h>
>  #endif
>
> +#include <inttypes.h>
>  #include <stdint.h>
>  #include <stdio.h>
>  #include <unistd.h>
> @@ -802,13 +803,14 @@ static int main_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, uint
>                 if (roundtrip <= mcc->latency) {
>                     // probably high load on client or server result with incorrect values
>                     mcc->latency = 0;
> -                    red_printf("net test: invalid values, latency %lu roundtrip %lu. assuming high"
> +                    red_printf("net test: invalid values, latency %" PRIu64
> +                               " roundtrip %" PRIu64 ". assuming high"
>                                "bandwidth", mcc->latency, roundtrip);
>                     break;
>                 }
>                 mcc->bitrate_per_sec = (uint64_t)(NET_TEST_BYTES * 8) * 1000000
>                                         / (roundtrip - mcc->latency);
> -                red_printf("net test: latency %f ms, bitrate %lu bps (%f Mbps)%s",
> +                red_printf("net test: latency %f ms, bitrate %"PRIu64" bps (%f Mbps)%s",
>                            (double)mcc->latency / 1000,
>                            mcc->bitrate_per_sec,
>                            (double)mcc->bitrate_per_sec / 1024 / 1024,
> --
> 1.7.7.1
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
>



-- 
Marc-André Lureau


More information about the Spice-devel mailing list