Message ID | 1615794606-114484-1-git-send-email-jiapeng.chong@linux.alibaba.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | tools/testing/selftests/vm/: fix warning comparing pointer to 0 | expand |
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()");
Fix the following coccicheck warning: ./tools/testing/selftests/vm/map_populate.c:82:16-17: WARNING comparing pointer to 0. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> --- tools/testing/selftests/vm/map_populate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)