mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
cswitch is unsigned, so don't compare it < 0. Any negative numbers
will look huge and be caught by > 100.
This commit is contained in:
parent
86e26cb154
commit
cba7d97b61
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269692
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue