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.
This commit is contained in:
parent
8070ad52a1
commit
98ef6ed422
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123739
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user