diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2013-06-11 01:01:16 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2013-06-11 01:01:16 +0000 |
commit | ee25096f5063136821bb594c0870bc2bb7eeea13 (patch) | |
tree | 14e6f98d10cf0db51d6fb443a0588f4003a10b4d /sys/kern/uipc_mbuf.c | |
parent | 47993d25dc90681cee30658b32b0b0454ffcefed (diff) |
return ENOBUFS on failure from m_defrag and m_tag_copy_chain.
m_foo functions that return errors are now consistent as far as i can tell.
ok bluhm@
Diffstat (limited to 'sys/kern/uipc_mbuf.c')
-rw-r--r-- | sys/kern/uipc_mbuf.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index f48f043ce6e..1f367ef2348 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_mbuf.c,v 1.171 2013/03/28 16:55:25 deraadt Exp $ */ +/* $OpenBSD: uipc_mbuf.c,v 1.172 2013/06/11 01:01:15 dlg Exp $ */ /* $NetBSD: uipc_mbuf.c,v 1.15.4.1 1996/06/13 17:11:44 cgd Exp $ */ /* @@ -548,7 +548,7 @@ m_defrag(struct mbuf *m, int how) struct mbuf *m0; if (m->m_next == NULL) - return 0; + return (0); #ifdef DIAGNOSTIC if (!(m->m_flags & M_PKTHDR)) @@ -556,12 +556,12 @@ m_defrag(struct mbuf *m, int how) #endif if ((m0 = m_gethdr(how, m->m_type)) == NULL) - return -1; + return (ENOBUFS); if (m->m_pkthdr.len > MHLEN) { MCLGETI(m0, how, NULL, m->m_pkthdr.len); if (!(m0->m_flags & M_EXT)) { m_free(m0); - return -1; + return (ENOBUFS); } } m_copydata(m, 0, m->m_pkthdr.len, mtod(m0, caddr_t)); @@ -597,7 +597,7 @@ m_defrag(struct mbuf *m, int how) m0->m_flags &= ~(M_EXT|M_CLUSTER); /* cluster is gone */ m_free(m0); - return 0; + return (0); } /* |