Date: Mon, 14 Apr 2003 08:41:48 -0700 (PDT) From: Robert Watson <rwatson@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 28930 for review Message-ID: <200304141541.h3EFfmwc043144@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=28930 Change 28930 by rwatson@rwatson_tislabs on 2003/04/14 08:41:17 When initializing mbuf label storage, don't store the error value: we'll never do anything with it, and it makes for additional diffs and ifdefs. Pointed out by: sam Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#32 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#32 (text+ko) ==== @@ -1301,16 +1301,12 @@ m_gethdr(int how, short type) { struct mbuf *mb; -#ifdef MAC - int error; -#endif mb = (struct mbuf *)mb_alloc(&mb_list_mbuf, how, type, 0, NULL); if (mb != NULL) { _mbhdr_setup(mb, type); #ifdef MAC - error = mac_init_mbuf(mb, MBTOM(how)); - if (error) { + if (mac_init_mbuf(mb, MBTOM(how)) != 0) { m_free(mb); return (NULL); } @@ -1354,16 +1350,12 @@ m_gethdr_clrd(int how, short type) { struct mbuf *mb; -#ifdef MAC - int error; -#endif mb = (struct mbuf *)mb_alloc(&mb_list_mbuf, how, type, 0, NULL); if (mb != NULL) { _mbhdr_setup(mb, type); #ifdef MAC - error = mac_init_mbuf(mb, MBTOM(how)); - if (error) { + if (mac_init_mbuf(mb, MBTOM(how)) != 0) { m_free(mb); return (NULL); } @@ -1474,9 +1466,6 @@ m_getcl(int how, short type, int flags) { struct mbuf *mb; -#ifdef MAC - int error; -#endif int cchnum; mb = (struct mbuf *)mb_alloc(&mb_list_mbuf, how, type, @@ -1504,8 +1493,7 @@ } #ifdef MAC if (flags & M_PKTHDR) { - error = mac_init_mbuf(mb, MBTOM(how)); - if (error) { + if (mac_init_mbuf(mb, MBTOM(how)) != 0) { m_free(mb); return (NULL); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304141541.h3EFfmwc043144>