m_pulldown(): Change an if () panic() into a KASSERT().

If we pass in a NULL mbuf to m_pulldown() we are in a bad situation
already.  There is no point in doing that check for production code.
Change the if () panic() into a KASSERT.

MFC after:	3 weeks
Sponsored by:	Netflix
This commit is contained in:
Bjoern A. Zeeb 2019-11-06 22:40:19 +00:00
parent f6689bce79
commit 28d7601989

View file

@ -101,8 +101,8 @@ m_pulldown(struct mbuf *m, int off, int len, int *offp)
int writable;
/* check invalid arguments. */
if (m == NULL)
panic("m == NULL in m_pulldown()");
KASSERT(m != NULL, ("%s: fix caller: m is NULL off %d len %d offp %p\n",
__func__, off, len, offp));
if (len > MCLBYTES) {
m_freem(m);
return NULL; /* impossible */