Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Aug 2014 21:56:37 +0000 (UTC)
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269691 - head/sys/geom/cache
Message-ID:  <53e3f615.291d.15c80fca@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: imp
Date: Thu Aug  7 21:56:37 2014
New Revision: 269691
URL: http://svnweb.freebsd.org/changeset/base/269691

Log:
  Unsigned values can never be less than 0.

Modified:
  head/sys/geom/cache/g_cache.c

Modified: head/sys/geom/cache/g_cache.c
==============================================================================
--- head/sys/geom/cache/g_cache.c	Thu Aug  7 21:56:32 2014	(r269690)
+++ head/sys/geom/cache/g_cache.c	Thu Aug  7 21:56:37 2014	(r269691)
@@ -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))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53e3f615.291d.15c80fca>