staging: comedi: use !x in place of NULL comparison
authorPayal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Sun, 31 Mar 2019 18:03:47 +0000 (23:33 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Apr 2019 17:23:42 +0000 (19:23 +0200)
Challenge suggested by coccinelle.
Avoid NULL comparison, compare using boolean operator.

Signed-off-by: Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/tests/ni_routes_test.c

index c6dc18f..f809051 100644 (file)
@@ -282,7 +282,7 @@ void test_ni_sort_device_routes(void)
 
 void test_ni_find_route_set(void)
 {
-       unittest(ni_find_route_set(bad_dest, &DR) == NULL,
+       unittest(!ni_find_route_set(bad_dest, &DR),
                 "check for nonexistent route_set\n");
        unittest(ni_find_route_set(dest0, &DR) == &DR.routes[0],
                 "find first route_set\n");