From owner-svn-src-head@FreeBSD.ORG Thu Aug 7 21:56:37 2014 Return-Path: Delivered-To: svn-src-head@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 B8ECEA4B for ; Thu, 7 Aug 2014 21:56:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 90DB02C8C for ; Thu, 7 Aug 2014 21:56:37 +0000 (UTC) Received: from imp (uid 547) (envelope-from imp@FreeBSD.org) id 291d by svn.freebsd.org (DragonFly Mail Agent v0.9+); Thu, 07 Aug 2014 21:56:37 +0000 From: Warner Losh Date: Thu, 7 Aug 2014 21:56:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269691 - head/sys/geom/cache X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e3f615.291d.15c80fca@svn.freebsd.org> X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2014 21:56:37 -0000 Author: imp Date: Thu Aug 7 21:56:37 2014 New Revision: 269691 URL: http://svnweb.freebsd.org/changeset/base/269691 Log: Unsigned values can never be less than 0. Modified: head/sys/geom/cache/g_cache.c Modified: head/sys/geom/cache/g_cache.c ============================================================================== --- head/sys/geom/cache/g_cache.c Thu Aug 7 21:56:32 2014 (r269690) +++ head/sys/geom/cache/g_cache.c Thu Aug 7 21:56:37 2014 (r269691) @@ -73,7 +73,7 @@ sysctl_handle_pct(SYSCTL_HANDLER_ARGS) error = sysctl_handle_int(oidp, &val, 0, req); if (error || !req->newptr) return (error); - if (val < 0 || val > 100) + if (val > 100) return (EINVAL); if ((arg1 == &g_cache_used_lo && val > g_cache_used_hi) || (arg1 == &g_cache_used_hi && g_cache_used_lo > val))