提交 1d4ec7b1 编写于 作者: R Roland Dreier 提交者: Linus Torvalds

Fix ZERO_OR_NULL_PTR(ZERO_SIZE_PTR)

The comparison with ZERO_SIZE_PTR in ZERO_OR_NULL_PTR() needs to be <=
(not just <) so that ZERO_OR_NULL_PTR(ZERO_SIZE_PTR) is 1.
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
[ Duh!  - Linus ]
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 efa7e867
......@@ -40,7 +40,7 @@
*/
#define ZERO_SIZE_PTR ((void *)16)
#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) < \
#define ZERO_OR_NULL_PTR(x) ((unsigned long)(x) <= \
(unsigned long)ZERO_SIZE_PTR)
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册