[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Fix do_commit() behavior

From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH] Fix do_commit() behavior
Date: Thu, 06 Aug 2009 18:39:45 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

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))

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

reply via email to

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