All of lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Egorov <egorov@linux.com>
To: Andreas Henriksson <andreas@fatal.se>
Cc: util-linux@vger.kernel.org
Subject: Re: [PATCH] lscpu: fix cppcheck warnings
Date: Sun, 14 Sep 2014 19:04:04 +0700	[thread overview]
Message-ID: <54158434.6050502@linux.com> (raw)
In-Reply-To: <20140914115745.GA20978@fatal.se>

Hello Andreas Henriksson!

Indeed, you are right. My fault. Should I send another patch, or amend
this one?

On 09/14/2014 06:57 PM, Andreas Henriksson wrote:
> 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


-- 
Best regards,

Boris Egorov

  reply	other threads:[~2014-09-14 12:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14 11:57 [PATCH] lscpu: fix cppcheck warnings Andreas Henriksson
2014-09-14 12:04 ` Boris Egorov [this message]
2014-09-15 16:33 ` Boris Egorov
2014-09-16  9:18   ` Karel Zak
  -- strict thread matches above, loose matches on Subject: below --
2014-09-12 18:11 Boris Egorov

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=54158434.6050502@linux.com \
    --to=egorov@linux.com \
    --cc=andreas@fatal.se \
    --cc=util-linux@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.