From 3b1bf8c2e9222b7d27e8b9084e637a84005de7ba Mon Sep 17 00:00:00 2001 From: ru Date: Tue, 25 Mar 2008 09:39:02 +0000 Subject: Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT. Removed dead code that assumed that M_TRYWAIT can return NULL; it's not true since the advent of MBUMA. Reviewed by: arch There are ongoing disputes as to whether we want to switch to directly using UMA flags M_WAITOK/M_NOWAIT for mbuf(9) allocation. --- sys/net/if_sl.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'sys/net/if_sl.c') diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 3e33970..801d3a7 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -298,20 +298,8 @@ slcreate(void) return (NULL); } - m = m_gethdr(M_TRYWAIT, MT_DATA); - if (m != NULL) { - MCLGET(m, M_TRYWAIT); - if ((m->m_flags & M_EXT) == 0) { - m_free(m); - m = NULL; - } - } - - if (m == NULL) { - printf("sl: can't allocate buffer\n"); - free(sc, M_SL); - return (NULL); - } + m = m_gethdr(M_WAIT, MT_DATA); + MCLGET(m, M_WAIT); sc->sc_ep = mtod(m, u_char *) + SLBUFSIZE; sc->sc_mbuf = m; -- cgit v1.1