Fix the following coccicheck warning:

./tools/testing/selftests/vm/map_populate.c:82:16-17: WARNING comparing
pointer to 0.

Reported-by: Abaci Robot <ab...@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.ch...@linux.alibaba.com>
---
 tools/testing/selftests/vm/map_populate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/map_populate.c 
b/tools/testing/selftests/vm/map_populate.c
index 6b8aeaa..fb11b9e 100644
--- a/tools/testing/selftests/vm/map_populate.c
+++ b/tools/testing/selftests/vm/map_populate.c
@@ -79,7 +79,7 @@ int main(int argc, char **argv)
        unsigned long *smap;
 
        ftmp = tmpfile();
-       BUG_ON(ftmp == 0, "tmpfile()");
+       BUG_ON(!ftmp, "tmpfile()");
 
        ret = ftruncate(fileno(ftmp), MMAP_SZ);
        BUG_ON(ret, "ftruncate()");
-- 
1.8.3.1

Reply via email to