Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Jun 2009 12:04:49 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        Roman Divacky <rdivacky@freebsd.org>
Cc:        current@freebsd.org
Subject:   Re: [PATCH]: if (cond); foo() in firewire
Message-ID:  <d763ac660906212104w4bf066eatf5529779e603bd0e@mail.gmail.com>
In-Reply-To: <20090621082022.GA88526@freebsd.org>
References:  <20090621082022.GA88526@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
2009/6/21 Roman Divacky <rdivacky@freebsd.org>:
> hi
>
> is this patch correct? may I commit it?
>
> Index: ../../../dev/firewire/fwdev.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- ../../../dev/firewire/fwdev.c =A0 =A0 =A0 (revision 194573)
> +++ ../../../dev/firewire/fwdev.c =A0 =A0 =A0 (working copy)
> @@ -443,7 +443,7 @@
> =A0 =A0 =A0 =A0xfer->send.pay_len =3D uio->uio_resid;
> =A0 =A0 =A0 =A0if (uio->uio_resid > 0) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if ((err =3D uiomove((caddr_t)&xfer->send.=
payload[0],
> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 uio->uio_resid, uio)));
> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 uio->uio_resid, uio)))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0goto out;
> =A0 =A0 =A0 =A0}
>
>
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?d763ac660906212104w4bf066eatf5529779e603bd0e>