summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAnh Tuan Phan <tuananhlfc@gmail.com>2023-08-17 23:00:33 +0700
committerAndrew Morton <akpm@linux-foundation.org>2023-08-24 16:20:27 -0700
commitbad5a3a42a31859705baf39c4fc92173b2716760 (patch)
tree66cd311d2b54a9e2d0889e358da777d928c74cf3 /tools
parent7131fd7e30b20c3de03ca5d674546675dfffce5f (diff)
selftests/mm: fix WARNING comparing pointer to 0
Remove comparing pointer to 0 to avoid this warning from coccinelle: ./tools/testing/selftests/mm/map_populate.c:80:16-17: WARNING comparing pointer to 0, suggest !E ./tools/testing/selftests/mm/map_populate.c:80:16-17: WARNING comparing pointer to 0 Link: https://lkml.kernel.org/r/20230817160033.90079-1-tuananhlfc@gmail.com Signed-off-by: Anh Tuan Phan <tuananhlfc@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/mm/map_populate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/mm/map_populate.c b/tools/testing/selftests/mm/map_populate.c
index 240f2d9dae7a..7945d0754875 100644
--- a/tools/testing/selftests/mm/map_populate.c
+++ b/tools/testing/selftests/mm/map_populate.c
@@ -77,7 +77,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()");