]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ringtest: fix an assert statement
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 15 Apr 2017 19:22:14 +0000 (22:22 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Tue, 2 May 2017 20:41:42 +0000 (23:41 +0300)
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>
tools/virtio/ringtest/main.c

index f31353fac5415d8b9f5614e6f46f71a8f062f09b..2801ab7547e228a0a0bfd6b88febcc82fe62ce61 100644 (file)
@@ -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);