summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2017-04-15 22:22:14 +0300
committerMichael S. Tsirkin <mst@redhat.com>2017-05-02 23:41:42 +0300
commit4f6d9bfc882450631251052756ed84658ec88a70 (patch)
treeeadc544cf409dbba8d5972e0457637c1368a7425 /tools
parenta351e9b9fc24e982ec2f0e76379a49826036da12 (diff)
downloadlinux-4f6d9bfc882450631251052756ed84658ec88a70.tar.xz
ringtest: fix an assert statement
There is an || vs && typo so the assert can never be triggered. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtio/ringtest/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/virtio/ringtest/main.c b/tools/virtio/ringtest/main.c
index f31353fac541..2801ab7547e2 100644
--- a/tools/virtio/ringtest/main.c
+++ b/tools/virtio/ringtest/main.c
@@ -86,7 +86,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);