summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2014-08-07 21:56:42 +0000
committerimp <imp@FreeBSD.org>2014-08-07 21:56:42 +0000
commit1cf5db2416d3e5249f74f5f5c3316f9106855dbe (patch)
treef52577d03e6f63d95aaf6f477ba10453dabc1b60 /sys/geom
parent5999dde41e506986034affd0e541d5c724e191c3 (diff)
downloadFreeBSD-src-1cf5db2416d3e5249f74f5f5c3316f9106855dbe.zip
FreeBSD-src-1cf5db2416d3e5249f74f5f5c3316f9106855dbe.tar.gz
cswitch is unsigned, so don't compare it < 0. Any negative numbers
will look huge and be caught by > 100.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/journal/g_journal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/geom/journal/g_journal.c b/sys/geom/journal/g_journal.c
index 52dbc36..9cc324c 100644
--- a/sys/geom/journal/g_journal.c
+++ b/sys/geom/journal/g_journal.c
@@ -172,7 +172,7 @@ g_journal_cache_switch_sysctl(SYSCTL_HANDLER_ARGS)
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;
OpenPOWER on IntegriCloud