From 98ef6ed422a98c5a23f580fa08cf563a05f9a9fe Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Tue, 23 Dec 2003 02:34:25 +0000 Subject: [PATCH] Don peril sensitive sunglasses and set NULL to an actual pointer type, but *only* for the kernel. We can do this because the kernel is not a standard C application environment. This would have stopped the recent mtx_* arg NULL/MTX_DEF mixups from going unnoticed for so long. --- sys/sys/_null.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/sys/_null.h b/sys/sys/_null.h index 36552546e2b..6059f578590 100644 --- a/sys/sys/_null.h +++ b/sys/sys/_null.h @@ -28,10 +28,14 @@ #ifndef NULL +#ifdef _KERNEL +#define NULL (void *)0 +#else #if defined(__LP64__) || defined(__amd64__) #define NULL 0L #else #define NULL 0 #endif +#endif /* _KERNEL */ #endif