From owner-p4-projects@FreeBSD.ORG Mon Apr 14 08:41:52 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7851937B417; Mon, 14 Apr 2003 08:41:51 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 174DE37B425 for ; Mon, 14 Apr 2003 08:41:49 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E3E7443FDF for ; Mon, 14 Apr 2003 08:41:48 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h3EFfm0U043147 for ; Mon, 14 Apr 2003 08:41:48 -0700 (PDT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h3EFfmwc043144 for perforce@freebsd.org; Mon, 14 Apr 2003 08:41:48 -0700 (PDT) Date: Mon, 14 Apr 2003 08:41:48 -0700 (PDT) Message-Id: <200304141541.h3EFfmwc043144@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 28930 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Apr 2003 15:41:52 -0000 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); }