]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Fix ZERO_OR_NULL_PTR(ZERO_SIZE_PTR)
authorRoland Dreier <rdreier@cisco.com>
Fri, 20 Jul 2007 19:13:20 +0000 (12:13 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 20 Jul 2007 19:33:44 +0000 (12:33 -0700)
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>
include/linux/slab.h

index 7d0ecc1659f063df2f69550aa3d3b157cd36f1fd..d859354b9e51ea73952b31371b21172e2622097e 100644 (file)
@@ -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)
 
 /*