qemu-devel
[Top][All Lists]
Advanced

[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: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1/2] qemu-io: small cleanups for the aio code
Date: Thu, 09 Jul 2009 15:02:59 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

Christoph Hellwig wrote:
        if (ctx->Pflag) {
-               void *cmp_buf = malloc(total);
+               void *cmp_buf = malloc(ctx->qiov.size);
- memset(cmp_buf, ctx->pattern, total);
-               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.

Regards,

Anthony Liguori




reply via email to

[Prev in Thread] Current Thread [Next in Thread]