From: Roland Dreier Date: Fri, 20 Jul 2007 19:13:20 +0000 (-0700) Subject: Fix ZERO_OR_NULL_PTR(ZERO_SIZE_PTR) X-Git-Tag: v2.6.23-rc1~197 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d4ec7b1d6f130818f9b62dea3411d9ee2ff6ff6;p=linux-2.6 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 --- diff --git a/include/linux/slab.h b/include/linux/slab.h index 7d0ecc1659..d859354b9e 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) /*