From owner-p4-projects@FreeBSD.ORG Mon Jan 22 15:56:33 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1EB2C16A410; Mon, 22 Jan 2007 15:56:33 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F195916A40A for ; Mon, 22 Jan 2007 15:56:32 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id E0A3B13C441 for ; Mon, 22 Jan 2007 15:56:32 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l0MFuWaE024429 for ; Mon, 22 Jan 2007 15:56:32 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l0MFuWtx024426 for perforce@freebsd.org; Mon, 22 Jan 2007 15:56:32 GMT (envelope-from millert@freebsd.org) Date: Mon, 22 Jan 2007 15:56:32 GMT Message-Id: <200701221556.l0MFuWtx024426@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 113340 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 15:56:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=113340 Change 113340 by millert@millert_macbook on 2007/01/22 15:55:36 Minor cleanup: Add SPAWAR contract number in comments Remove NULL mbuf label check that is no longer needed No need for error variable when using MAC_INTERNALIZE/MAC_EXTERNALIZE Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_net.c#11 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_net.c#11 (text+ko) ==== @@ -13,6 +13,9 @@ * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), * as part of the DARPA CHATS research program. * + * This software was enhanced by SPARTA ISSO under SPAWAR contract + * N66001-04-C-6019 ("SEFOS"). + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -210,9 +213,6 @@ src_label = mac_mbuf_to_label(m_from); dest_label = mac_mbuf_to_label(m_to); - if (src_label == NULL || dest_label == NULL) - return; - MAC_PERFORM(mbuf_label_copy, src_label, dest_label); } @@ -227,21 +227,15 @@ mac_ifnet_label_externalize(struct label *label, char *elements, char *outbuf, size_t outbuflen) { - int error; - error = MAC_EXTERNALIZE(ifnet, label, elements, outbuf, outbuflen); - - return (error); + return (MAC_EXTERNALIZE(ifnet, label, elements, outbuf, outbuflen)); } static int mac_ifnet_label_internalize(struct label *label, char *string) { - int error; - error = MAC_INTERNALIZE(ifnet, label, string); - - return (error); + return (MAC_INTERNALIZE(ifnet, label, string)); } void