From: Avi Kivity <avi@redhat.com>
To: Luiz Capitulino <lcapitulino@redhat.com>
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] [PATCH] Fix do_commit() behavior
Date: Thu, 06 Aug 2009 18:39:45 +0300 [thread overview]
Message-ID: <4A7AF941.1090605@redhat.com> (raw)
In-Reply-To: <20090731151541.701b8c60@doriath>
On 07/31/2009 09:15 PM, Luiz Capitulino wrote:
> all_devices = !strcmp(device, "all");
> TAILQ_FOREACH(dinfo,&drives, next) {
> if (!all_devices)
> - if (!strcmp(bdrv_get_device_name(dinfo->bdrv), device))
> + if (strcmp(bdrv_get_device_name(dinfo->bdrv), device))
> continue;
> bdrv_commit(dinfo->bdrv);
> }
>
strcmp() without == 0 or != 0 is evil, as is !strcmp(). strcmp() does
not return a boolean value or a count.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2009-08-06 15:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-31 18:15 [Qemu-devel] [PATCH] Fix do_commit() behavior Luiz Capitulino
2009-08-03 8:47 ` [Qemu-devel] " Gerd Hoffmann
2009-08-06 15:39 ` Avi Kivity [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A7AF941.1090605@redhat.com \
--to=avi@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=kraxel@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).