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

Re: [libvirt] [PATCH] Replace two strcmp() by STREQ() in qemu_driver.c



On 10/23/2009 07:01 AM, Chris Lalancette wrote:
> Signed-off-by: Chris Lalancette <clalance redhat com>
> ---
>  src/qemu/qemu_driver.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 4cd235d..da7dda7 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -4142,7 +4142,7 @@ qemudCanonicalizeMachineFromInfo(virDomainDefPtr def,
>          if (!machine->canonical)
>              continue;
>  
> -        if (strcmp(def->os.machine, machine->name) != 0)
> +        if (STRNEQ(def->os.machine, machine->name))
>              continue;
>  
>          if (!(*canonical = strdup(machine->canonical))) {
> @@ -4171,7 +4171,7 @@ qemudCanonicalizeMachineDirect(virDomainDefPtr def, char **canonical)
>          if (!machines[i]->canonical)
>              continue;
>  
> -        if (strcmp(def->os.machine, machines[i]->name) != 0)
> +        if (STRNEQ(def->os.machine, machines[i]->name))
>              continue;
>  
>          *canonical = machines[i]->canonical;

ACK, We add a make syntax-check for that.

- Cole


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