diff options
Diffstat (limited to 'sys/netinet/sctp_lock_bsd.h')
-rw-r--r-- | sys/netinet/sctp_lock_bsd.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/netinet/sctp_lock_bsd.h b/sys/netinet/sctp_lock_bsd.h index 6d59d35..6db9057 100644 --- a/sys/netinet/sctp_lock_bsd.h +++ b/sys/netinet/sctp_lock_bsd.h @@ -365,14 +365,20 @@ extern int sctp_logoff_stuff; do { \ atomic_add_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ } while (0) - +#ifdef INVARIANTS #define SCTP_DECR_CHK_COUNT() \ do { \ if(SCTP_BASE_INFO(ipi_count_chunk) == 0) \ panic("chunk count to 0?"); \ atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ } while (0) - +#else +#define SCTP_DECR_CHK_COUNT() \ + do { \ + if(SCTP_BASE_INFO(ipi_count_chunk) != 0) \ + atomic_subtract_int(&SCTP_BASE_INFO(ipi_count_chunk), 1); \ + } while (0) +#endif #define SCTP_INCR_READQ_COUNT() \ do { \ atomic_add_int(&SCTP_BASE_INFO(ipi_count_readq),1); \ |