mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-10 23:29:46 +00:00
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: Roland Dreier <rolandd@cisco.com> [ Duh! - Linus ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
efa7e8673c
commit
1d4ec7b1d6
@ -40,7 +40,7 @@
|
|||||||
*/
|
*/
|
||||||
#define ZERO_SIZE_PTR ((void *)16)
|
#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)
|
(unsigned long)ZERO_SIZE_PTR)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user