qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: Re: [PATCH] cpus: Fix botched configure_icount() error API violation fix
Date: Thu, 21 May 2020 16:43:14 +0200	[thread overview]
Message-ID: <28c289f3-eb3f-eb1a-f79b-b339437bef8a@redhat.com> (raw)
In-Reply-To: <20200508104933.19051-1-armbru@redhat.com>

On 08/05/20 12:49, Markus Armbruster wrote:
> Fixes: abc9bf69a66a11499a801ff545b8fe7adbb3a04c
> Fixes: Coverity CID 1428754
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  cpus.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/cpus.c b/cpus.c
> index 5670c96bcf..b9275c672d 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -813,7 +813,7 @@ void configure_icount(QemuOpts *opts, Error **errp)
>          return;
>      }
>  
> -    if (strcmp(option, "auto") != 0) {
> +    if (option && !strcmp(option, "auto")) {
>          if (qemu_strtol(option, NULL, 0, &time_shift) < 0
>              || time_shift < 0 || time_shift > MAX_ICOUNT_SHIFT) {
>              error_setg(errp, "icount: Invalid shift value");
> 

Queued, thanks.

Paolo



  parent reply	other threads:[~2020-05-21 14:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 10:49 [PATCH] cpus: Fix botched configure_icount() error API violation fix Markus Armbruster
2020-05-08 13:45 ` Eric Blake
2020-05-08 16:12   ` Philippe Mathieu-Daudé
2020-05-08 17:43 ` Markus Armbruster
2020-05-21 14:43 ` Paolo Bonzini [this message]
2020-05-25  5:44   ` Markus Armbruster
2020-05-25 10:21     ` Paolo Bonzini

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=28c289f3-eb3f-eb1a-f79b-b339437bef8a@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).