Date: Mon, 7 Feb 2011 22:52:16 +0000 From: Alexander Best <arundel@freebsd.org> To: freebsd-emulation@freebsd.org Subject: [patch] comparison of u_long against < 0 in linux32_machdep.c Message-ID: <20110207225216.GA62134@freebsd.org>
next in thread | raw e-mail | index | archive | help
--envbJBWh7q8WU6mo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
hi there,
this was reported by clang 2.9 (dev) as -Wtautological-compare warning. i think
clang is right, because linux_iopl_args.level is of type u_long.
cheers.
alex
--
a13x
--envbJBWh7q8WU6mo
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="linux32_machdep.c.diff"
Index: sys/amd64/linux32/linux32_machdep.c
===================================================================
--- sys/amd64/linux32/linux32_machdep.c (revision 218413)
+++ sys/amd64/linux32/linux32_machdep.c (working copy)
@@ -911,7 +911,7 @@
{
int error;
- if (args->level < 0 || args->level > 3)
+ if (args->level > 3)
return (EINVAL);
if ((error = priv_check(td, PRIV_IO)) != 0)
return (error);
--envbJBWh7q8WU6mo--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110207225216.GA62134>
