mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
kassert: Turn 'poisoned_buf' into a 'void *'
This is a step to make <sys/kassert.h> usable without the need to explicitly include other headers. 'poisoned_buf' is only used for its value and never subject to pointer arithmetics. Keeping 'caddr_t' would require <sys/kassert.h> to include <sys/types.h> (at least on INVARIANTS). Reviewed by: markj MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49971
This commit is contained in:
parent
a4df0830d7
commit
b0d4c94657
2 changed files with 3 additions and 3 deletions
|
|
@ -160,7 +160,7 @@ nbufp(unsigned i)
|
|||
|
||||
caddr_t __read_mostly unmapped_buf;
|
||||
#ifdef INVARIANTS
|
||||
caddr_t poisoned_buf = (void *)-1;
|
||||
void *poisoned_buf = (void *)-1;
|
||||
#endif
|
||||
|
||||
/* Used below and for softdep flushing threads in ufs/ffs/ffs_softdep.c */
|
||||
|
|
|
|||
|
|
@ -51,11 +51,11 @@ extern const char *panicstr; /* panic message */
|
|||
*/
|
||||
#ifdef INVARIANTS
|
||||
|
||||
extern caddr_t poisoned_buf;
|
||||
extern void *poisoned_buf;
|
||||
#define DEBUG_POISON_POINTER_VALUE poisoned_buf
|
||||
|
||||
#define DEBUG_POISON_POINTER(x) ({ \
|
||||
x = (void *)(DEBUG_POISON_POINTER_VALUE); \
|
||||
x = (DEBUG_POISON_POINTER_VALUE); \
|
||||
})
|
||||
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue