Unsigned values can never be less than 0.

This commit is contained in:
Warner Losh 2014-08-07 21:56:37 +00:00
parent 8baa44e571
commit 86e26cb154
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=269691

View File

@ -73,7 +73,7 @@ sysctl_handle_pct(SYSCTL_HANDLER_ARGS)
error = sysctl_handle_int(oidp, &val, 0, req);
if (error || !req->newptr)
return (error);
if (val < 0 || val > 100)
if (val > 100)
return (EINVAL);
if ((arg1 == &g_cache_used_lo && val > g_cache_used_hi) ||
(arg1 == &g_cache_used_hi && g_cache_used_lo > val))