Re: [PATCH] lscpu: fix cppcheck warnings

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

 



Hello Boris Egorov!

I spotted something in your patch that doesn't look right to me.

[...]
> --- a/sys-utils/lscpu-dmi.c
> +++ b/sys-utils/lscpu-dmi.c
> @@ -161,7 +161,7 @@ static int hypervisor_from_dmi_table(uint32_t base, uint16_t len,
>  	else if (manufacturer && strstr(manufacturer, "HITACHI") &&
>  					product && strstr(product, "LPAR"))
>  		rc = HYPER_HITACHI;
> -	else if (!vendor && strcmp(vendor, "Parallels"))
> +	else if (vendor && strcmp(vendor, "Parallels"))
                           ^
Shouldn't the ! be here? --^
(alternatively: vendor && 0 == strcmp...)

>  		rc = HYPER_PARALLELS;
>  done:
>  	free(buf);
[...]


Regards,
Andreas Henriksson
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux