[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] qemu-io: small cleanups for the aio code
From: |
malc |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] qemu-io: small cleanups for the aio code |
Date: |
Fri, 10 Jul 2009 14:20:07 +0400 (MSD) |
On Fri, 10 Jul 2009, Christoph Hellwig wrote:
> On Thu, Jul 09, 2009 at 03:02:59PM -0500, Anthony Liguori wrote:
> > >- if (memcmp(ctx->buf, cmp_buf, total)) {
> > >+ memset(cmp_buf, ctx->pattern, ctx->qiov.size);
> > >+ if (memcmp(ctx->buf, cmp_buf, ctx->qiov.size)) {
> > > printf("Pattern verification failed at offset %lld, "
> > > "%d bytes\n",
> > >- (long long) ctx->offset, total);
> > >+ (long long) ctx->offset, ctx->qiov.size);
> > >
> >
> > This breaks the build because ctx->qiov.size is a size_t and your format
> > parameter is a %d.
>
> Work fine on 32 bit x86 :) But yeah, the correct format that works on
> all platforms would be %zd.
Just a small correction - it wouldn't work on Windows.
--
mailto:address@hidden