On Sun, 8 Dec 2013, Justin Hibbits wrote:
On Sun, 8 Dec 2013 13:53:30 +1100 (EST)
Bruce Evans <b...@optusnet.com.au> wrote:
On Sat, 7 Dec 2013, Justin Hibbits wrote:
[>]* [...]
Modified: head/sys/geom/cache/g_cache.c
==============================================================================
--- head/sys/geom/cache/g_cache.c Sat Dec 7 19:39:38
2013 (r259079) +++ head/sys/geom/cache/g_cache.c Sat
Dec 7 19:55:34 2013 (r259080) @@ -67,7 +67,7 @@ static
u_int g_cache_used_hi = 20; static int
sysctl_handle_pct(SYSCTL_HANDLER_ARGS)
{
- u_int val = *(u_int *)arg1;
+ int val;
int error;
error = sysctl_handle_int(oidp, &val, 0, req);
This adds the larger non-style bug that val is used uninitialized.
Compilers should warn about this. This results in stack garbage
being copied out instead of the "old" value.
...
I just reverted these two changes in r259096. Rather than fix what I
did and change the rest of the files, I'm leaving them for another day,
and reverted my changes so they're at least back to the working order
from before.
Thanks.
Does it work to just remove the check for val < 0?
Bruce
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"