diff options
author | imp <imp@FreeBSD.org> | 2014-08-07 21:56:42 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2014-08-07 21:56:42 +0000 |
commit | 1cf5db2416d3e5249f74f5f5c3316f9106855dbe (patch) | |
tree | f52577d03e6f63d95aaf6f477ba10453dabc1b60 /sys/geom/journal | |
parent | 5999dde41e506986034affd0e541d5c724e191c3 (diff) | |
download | FreeBSD-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/journal')
-rw-r--r-- | sys/geom/journal/g_journal.c | 2 |
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; |