Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- |Date: Mon, 22 Jun 2009 14:20:55 +0300
- |From: Andriy Gapon <avg@icyb.net.ua>
- |To: Steve Kargl <sgk@troutmask.apl.washington.edu>,
- | Adrian Chadd <adrian@freebsd.org>
- |Cc: Roman Divacky <rdivacky@freebsd.org>, current@freebsd.org
- |User-Agent: Thunderbird 2.0.0.21 (X11/20090406)
- |Subject: Re: [PATCH]: if (cond); foo() in firewire
- |
- |on 22/06/2009 07:54 Steve Kargl said the following:
- |> On Mon, Jun 22, 2009 at 12:04:49PM +0800, Adrian Chadd wrote:
- |>> 2009/6/21 Roman Divacky <rdivacky@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!)
- |
- |You confuse me. It is a "vanilla userland transfer", but so?
- |Current code always goes to "out" label regardless if uimove succeeded or not.
- |I think the idea was to go "out" only if uimove failed and execute some code
- |between if and out-label otherwise.
- |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement