diff options
-rw-r--r-- | sys/kern/kern_malloc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 0e3403b..2171817 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -268,10 +268,9 @@ malloc(unsigned long size, struct malloc_type *mtp, int flags) #ifdef INVARIANTS /* - * To make sure that WAITOK or NOWAIT is set, but not more than - * one, and check against the API botches that are common. + * Check that exactly one of M_WAITOK or M_NOWAIT is specified. */ - indx = flags & (M_WAITOK | M_NOWAIT | M_DONTWAIT | M_TRYWAIT); + indx = flags & (M_WAITOK | M_NOWAIT); if (indx != M_NOWAIT && indx != M_WAITOK) { static struct timeval lasterr; static int curerr, once; |