svn commit: r269692 - head/sys/geom/journal
Warner Losh
imp at FreeBSD.org
Thu Aug 7 21:56:42 UTC 2014
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;
More information about the svn-src-all
mailing list