]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
epoll: stop comparing pointers with 0 in self-test app
authorSasha Levin <sasha.levin@oracle.com>
Tue, 26 Mar 2013 23:25:07 +0000 (10:25 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:12:30 +0000 (17:12 +1100)
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Reviewed-by: Daniel Hazelton <dshadowwolf@gmail.com>
Cc: "Paton J. Lewis" <palewis@adobe.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/epoll/test_epoll.c

index 4a14a7f084c10d7fa5e714b915af12fe8e0aa5a1..1034ed4cc5b4a749b4d8d036159036e137a81057 100644 (file)
@@ -199,8 +199,8 @@ int main(int argc, char **argv)
 
        epoll_items = malloc(n_epoll_items * sizeof(struct epoll_item_private));
 
-       if (epoll_set < 0 || epoll_items == 0 || write_thread_data.fds == 0 ||
-               read_thread_data == 0 || read_threads == 0)
+       if (epoll_set < 0 || !epoll_items || write_thread_data.fds == NULL ||
+               !read_thread_data || !read_threads)
                goto error;
 
        if (sysconf(_SC_NPROCESSORS_ONLN) < 2) {