mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
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
1 changed files with 4 additions and 0 deletions
|
|
@ -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 a new issue