public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] ringtest: fix an assert statement
Date: Tue, 18 Apr 2017 03:01:49 +0000	[thread overview]
Message-ID: <e6715605-242b-bf8f-855b-ba443054c87d@redhat.com> (raw)
In-Reply-To: <20170415192214.GB6416@mwanda>



On 2017年04月16日 03:22, Dan Carpenter wrote:
> There is an || vs && typo so the assert can never be triggered.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/tools/virtio/ringtest/main.c b/tools/virtio/ringtest/main.c
> index 022ae95a06bd..453ca3c21193 100644
> --- a/tools/virtio/ringtest/main.c
> +++ b/tools/virtio/ringtest/main.c
> @@ -87,7 +87,7 @@ void set_affinity(const char *arg)
>   	cpu = strtol(arg, &endptr, 0);
>   	assert(!*endptr);
>   
> -	assert(cpu >= 0 || cpu < CPU_SETSIZE);
> +	assert(cpu >= 0 && cpu < CPU_SETSIZE);
>   
>   	self = pthread_self();
>   	CPU_ZERO(&cpuset);

Acked-by: Jason Wang <jasowang@redhat.com>

      reply	other threads:[~2017-04-18  3:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-15 19:22 [PATCH] ringtest: fix an assert statement Dan Carpenter
2017-04-18  3:01 ` Jason Wang [this message]

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=e6715605-242b-bf8f-855b-ba443054c87d@redhat.com \
    --to=jasowang@redhat.com \
    --cc=kernel-janitors@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox