Allow the first (and second) argument of sn_calloc() be a sum.

This fixes a bug reported in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224103
PR:		224103
This commit is contained in:
Michael Tuexen 2017-12-26 14:37:47 +00:00
parent 4f96b2503d
commit c9256941d0

View File

@ -187,7 +187,7 @@ static MALLOC_DEFINE(M_SCTPNAT, "sctpnat", "sctp nat dbs");
/* Use kernel allocator. */
#ifdef _SYS_MALLOC_H_
#define sn_malloc(x) malloc(x, M_SCTPNAT, M_NOWAIT|M_ZERO)
#define sn_calloc(n,x) sn_malloc(x * n)
#define sn_calloc(n,x) sn_malloc((x) * (n))
#define sn_free(x) free(x, M_SCTPNAT)
#endif// #ifdef _SYS_MALLOC_H_