Skip to content

Commit bad5a3a

Browse files
tuananhlfcakpm00
authored andcommitted
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/[email protected] Signed-off-by: Anh Tuan Phan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 7131fd7 commit bad5a3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/mm/map_populate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ int main(int argc, char **argv)
7777
unsigned long *smap;
7878

7979
ftmp = tmpfile();
80-
BUG_ON(ftmp == 0, "tmpfile()");
80+
BUG_ON(!ftmp, "tmpfile()");
8181

8282
ret = ftruncate(fileno(ftmp), MMAP_SZ);
8383
BUG_ON(ret, "ftruncate()");

0 commit comments

Comments
 (0)