From 1d4ec7b1d6f130818f9b62dea3411d9ee2ff6ff6 Mon Sep 17 00:00:00 2001 From: Roland Dreier Date: Fri, 20 Jul 2007 12:13:20 -0700 Subject: [PATCH] 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 [ Duh! - Linus ] Signed-off-by: Linus Torvalds --- include/linux/slab.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/slab.h b/include/linux/slab.h index 7d0ecc1659f0..d859354b9e51 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -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) /* -- GitLab