From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MZ4yy-0003mu-CZ for qemu-devel@nongnu.org; Thu, 06 Aug 2009 11:34:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MZ4yt-0003mh-1D for qemu-devel@nongnu.org; Thu, 06 Aug 2009 11:34:19 -0400 Received: from [199.232.76.173] (port=49029 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZ4ys-0003me-Px for qemu-devel@nongnu.org; Thu, 06 Aug 2009 11:34:14 -0400 Received: from mx2.redhat.com ([66.187.237.31]:34949) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MZ4yq-0005FW-Lk for qemu-devel@nongnu.org; Thu, 06 Aug 2009 11:34:13 -0400 Message-ID: <4A7AF941.1090605@redhat.com> Date: Thu, 06 Aug 2009 18:39:45 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Fix do_commit() behavior References: <20090731151541.701b8c60@doriath> In-Reply-To: <20090731151541.701b8c60@doriath> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, kraxel@redhat.com 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