mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -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