From owner-p4-projects Tue Mar 25 12:16:53 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1CE6737B405; Tue, 25 Mar 2003 12:16:49 -0800 (PST) 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 C5C9037B404 for ; Tue, 25 Mar 2003 12:16:48 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6731A43F3F for ; Tue, 25 Mar 2003 12:16:48 -0800 (PST) (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 h2PKGm0U094894 for ; Tue, 25 Mar 2003 12:16:48 -0800 (PST) (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 h2PKGloa094891 for perforce@freebsd.org; Tue, 25 Mar 2003 12:16:47 -0800 (PST) Date: Tue, 25 Mar 2003 12:16:47 -0800 (PST) Message-Id: <200303252016.h2PKGloa094891@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 Subject: PERFORCE change 27379 for review To: Perforce Change Reviews X-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,PATCH_UNIFIED_DIFF,UPPERCASE_25_50,X_AUTH_WARNING autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=27379 Change 27379 by rwatson@rwatson_tislabs on 2003/03/25 12:16:37 Rename MBUF_TO_MALLOC() to MBTOM(), which is substantially more compact. Suggested by: sam Affected files ... .. //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#30 edit .. //depot/projects/trustedbsd/mac/sys/sys/mbuf.h#25 edit Differences ... ==== //depot/projects/trustedbsd/mac/sys/kern/subr_mbuf.c#30 (text+ko) ==== @@ -1306,7 +1306,7 @@ if (mb != NULL) { _mbhdr_setup(mb, type); #ifdef MAC - if (mac_init_mbuf(mb, MBUF_TO_MALLOC(how)) != 0) { + if (mac_init_mbuf(mb, MBTOM(how)) != 0) { m_free(mb); return NULL; } @@ -1355,7 +1355,7 @@ if (mb != NULL) { _mbhdr_setup(mb, type); #ifdef MAC - if (mac_init_mbuf(mb, MBUF_TO_MALLOC(how)) != 0) { + if (mac_init_mbuf(mb, MBTOM(how)) != 0) { m_free(mb); return NULL; } @@ -1502,7 +1502,7 @@ _mext_init_ref(mb, &cl_refcntmap[cl2ref(mb->m_ext.ext_buf)]); } #ifdef MAC - if ((flags & M_PKTHDR) && (mac_init_mbuf(mb, MBUF_TO_MALLOC(how)) + if ((flags & M_PKTHDR) && (mac_init_mbuf(mb, MBTOM(how)) != 0)) { m_free(mb); return NULL; ==== //depot/projects/trustedbsd/mac/sys/sys/mbuf.h#25 (text+ko) ==== @@ -272,7 +272,7 @@ #define M_DONTWAIT 0x4 /* don't conflict with M_NOWAIT */ #define M_TRYWAIT 0x8 /* or M_WAITOK */ #define M_WAIT M_TRYWAIT /* XXX: Deprecated. */ -#define MBUF_TO_MALLOC(how) ((how) == M_TRYWAIT ? M_WAITOK : M_NOWAIT) +#define MBTOM(how) ((how) == M_TRYWAIT ? M_WAITOK : M_NOWAIT) #ifdef _KERNEL /*- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message