From owner-svn-src-stable@FreeBSD.ORG Sat Aug 16 13:12:00 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3188C2F3; Sat, 16 Aug 2014 13:12:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CA552A3A; Sat, 16 Aug 2014 13:12:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s7GDBxDh037047; Sat, 16 Aug 2014 13:11:59 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s7GDBxkg037046; Sat, 16 Aug 2014 13:11:59 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201408161311.s7GDBxkg037046@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sat, 16 Aug 2014 13:11:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r270045 - stable/10/sys/security/mac X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Aug 2014 13:12:00 -0000 Author: bz Date: Sat Aug 16 13:11:59 2014 New Revision: 270045 URL: http://svnweb.freebsd.org/changeset/base/270045 Log: MFC r259885: As constantly reported during kernel compilation, m_buflen is unsigned so can never be < 0. Remove the expression, which can never be true. Modified: stable/10/sys/security/mac/mac_framework.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/security/mac/mac_framework.c ============================================================================== --- stable/10/sys/security/mac/mac_framework.c Sat Aug 16 13:09:40 2014 (r270044) +++ stable/10/sys/security/mac/mac_framework.c Sat Aug 16 13:11:59 2014 (r270045) @@ -587,8 +587,7 @@ int mac_check_structmac_consistent(struct mac *mac) { - if (mac->m_buflen < 0 || - mac->m_buflen > MAC_MAX_LABEL_BUF_LEN) + if (mac->m_buflen > MAC_MAX_LABEL_BUF_LEN) return (EINVAL); return (0);