[PATCH]: if (cond); foo() in firewire
Adrian Chadd
adrian at freebsd.org
Mon Jun 22 04:25:06 UTC 2009
2009/6/21 Roman Divacky <rdivacky at freebsd.org>:
> hi
>
> is this patch correct? may I commit it?
>
> Index: ../../../dev/firewire/fwdev.c
> ===================================================================
> --- ../../../dev/firewire/fwdev.c (revision 194573)
> +++ ../../../dev/firewire/fwdev.c (working copy)
> @@ -443,7 +443,7 @@
> xfer->send.pay_len = uio->uio_resid;
> if (uio->uio_resid > 0) {
> if ((err = uiomove((caddr_t)&xfer->send.payload[0],
> - uio->uio_resid, uio)));
> + uio->uio_resid, uio)))
> goto out;
> }
>
>
> another bug found by the "useless warnings in clang" ;)
Is clang also evaluating all subsequent execution paths to tell you
what the change in program flow is? :)
I hate to be the harbinger of evilness, but I'd at least attempt a
cursory glance at the code to make sure subsequent code is doing the
right thing. (It certainly looks like a vanilla userland transfer!)
2c,
Adrian
More information about the freebsd-current
mailing list