From owner-svn-src-all@FreeBSD.ORG Thu Aug 7 21:56:42 2014 Return-Path: Delivered-To: svn-src-all@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 9E28BB86 for ; Thu, 7 Aug 2014 21:56:42 +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 74EB22C8E for ; Thu, 7 Aug 2014 21:56:42 +0000 (UTC) Received: from imp (uid 547) (envelope-from imp@FreeBSD.org) id 2936 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Thu, 07 Aug 2014 21:56:42 +0000 From: Warner Losh Date: Thu, 7 Aug 2014 21:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269692 - head/sys/geom/journal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e3f61a.2936.6db30e60@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Aug 2014 21:56:42 -0000 Author: imp Date: Thu Aug 7 21:56:42 2014 New Revision: 269692 URL: http://svnweb.freebsd.org/changeset/base/269692 Log: cswitch is unsigned, so don't compare it < 0. Any negative numbers will look huge and be caught by > 100. Modified: head/sys/geom/journal/g_journal.c Modified: head/sys/geom/journal/g_journal.c ============================================================================== --- head/sys/geom/journal/g_journal.c Thu Aug 7 21:56:37 2014 (r269691) +++ head/sys/geom/journal/g_journal.c Thu Aug 7 21:56:42 2014 (r269692) @@ -172,7 +172,7 @@ g_journal_cache_switch_sysctl(SYSCTL_HAN error = sysctl_handle_int(oidp, &cswitch, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (cswitch < 0 || cswitch > 100) + if (cswitch > 100) return (EINVAL); g_journal_cache_switch = cswitch; g_journal_cache_low = (g_journal_cache_limit / 100) * cswitch;