Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2014 21:56:42 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269692 - head/sys/geom/journal
Message-ID:  <53e3f61a.2936.6db30e60@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e3f61a.2936.6db30e60>