ringtest: fix an assert statement
Subsystems (2)
PATCH 1/1 ringtest: fix an assert statement
There is an || vs && typo so the assert can never be triggered.
Signed-off-by Dan Carpenter <[email protected]>
tools/virtio/ringtest/main.c +1 -1
@@ -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);
Quoted 9 lines · Dan Carpenter
There is an || vs && typo so the assert can never be triggered.
Signed-off-by Dan Carpenter <[email protected]>tools/virtio/ringtest/main.c +0
-0
tools/virtio/ringtest/main.c void set_affinity(const char *arg) · line 93
Quoted 8 lines
tools/virtio/ringtest/main.c +1
-1@@ -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 <[email protected]>
Quoted 9 lines · Dan Carpenter
There is an || vs && typo so the assert can never be triggered.
Signed-off-by Dan Carpenter <[email protected]>tools/virtio/ringtest/main.c +0
-0
tools/virtio/ringtest/main.c void set_affinity(const char *arg) · line 93
Quoted 8 lines
tools/virtio/ringtest/main.c +1
-1@@ -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 <[email protected]>
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization