[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1615794606-114484-1-git-send-email-jiapeng.chong@linux.alibaba.com>
Date: Mon, 15 Mar 2021 15:50:06 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: shuah@...nel.org
Cc: linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
Subject: [PATCH] tools/testing/selftests/vm/: fix warning comparing pointer to 0
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@...ux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.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
Powered by blists - more mailing lists