diff options
author | Payal Kshirsagar <payal.s.kshirsagar.98@gmail.com> | 2019-03-31 21:03:47 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-01 20:23:42 +0300 |
commit | 643cd0a25d5d1605eb3e6b083ef5accaddc616cf (patch) | |
tree | dae2fb70383d350bad529eda8ef758a8909d95ce /drivers/staging/comedi | |
parent | 198980e079a4de0da49ec0d88f07f9124b4fbcd0 (diff) | |
download | linux-643cd0a25d5d1605eb3e6b083ef5accaddc616cf.tar.xz |
staging: comedi: use !x in place of NULL comparison
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>
Diffstat (limited to 'drivers/staging/comedi')
-rw-r--r-- | drivers/staging/comedi/drivers/tests/ni_routes_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/drivers/tests/ni_routes_test.c b/drivers/staging/comedi/drivers/tests/ni_routes_test.c index c6dc18f346e8..f809051820ac 100644 --- a/drivers/staging/comedi/drivers/tests/ni_routes_test.c +++ b/drivers/staging/comedi/drivers/tests/ni_routes_test.c @@ -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"); |