Advertisement
Guest User

Untitled

a guest
May 7th, 2017
562
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. |Date: Mon, 22 Jun 2009 14:20:55 +0300
  2. |From: Andriy Gapon <avg@icyb.net.ua>
  3. |To: Steve Kargl <sgk@troutmask.apl.washington.edu>,
  4. | Adrian Chadd <adrian@freebsd.org>
  5. |Cc: Roman Divacky <rdivacky@freebsd.org>, current@freebsd.org
  6. |User-Agent: Thunderbird 2.0.0.21 (X11/20090406)
  7. |Subject: Re: [PATCH]: if (cond); foo() in firewire
  8. |
  9. |on 22/06/2009 07:54 Steve Kargl said the following:
  10. |> On Mon, Jun 22, 2009 at 12:04:49PM +0800, Adrian Chadd wrote:
  11. |>> 2009/6/21 Roman Divacky <rdivacky@freebsd.org>:
  12. |>>> hi
  13. |>>>
  14. |>>> is this patch correct? may I commit it?
  15. |>>>
  16. |>>> Index: ../../../dev/firewire/fwdev.c
  17. |>>> ===================================================================
  18. |>>> --- ../../../dev/firewire/fwdev.c (revision 194573)
  19. |>>> +++ ../../../dev/firewire/fwdev.c (working copy)
  20. |>>> @@ -443,7 +443,7 @@
  21. |>>> xfer->send.pay_len = uio->uio_resid;
  22. |>>> if (uio->uio_resid > 0) {
  23. |>>> if ((err = uiomove((caddr_t)&xfer->send.payload[0],
  24. |>>> - uio->uio_resid, uio)));
  25. |>>> + uio->uio_resid, uio)))
  26. |>>> goto out;
  27. |>>> }
  28. |>>>
  29. |>>>
  30. |>>> another bug found by the "useless warnings in clang" ;)
  31. |>> Is clang also evaluating all subsequent execution paths to tell you
  32. |>> what the change in program flow is? :)
  33. |>>
  34. |>> I hate to be the harbinger of evilness, but I'd at least attempt a
  35. |>> cursory glance at the code to make sure subsequent code is doing the
  36. |>> right thing. (It certainly looks like a vanilla userland transfer!)
  37. |
  38. |You confuse me. It is a "vanilla userland transfer", but so?
  39. |Current code always goes to "out" label regardless if uimove succeeded or not.
  40. |I think the idea was to go "out" only if uimove failed and execute some code
  41. |between if and out-label otherwise.
  42. |
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement