Re: [PATCH]: if (cond); foo() in firewire

From: Jung-uk Kim <jkim_at_FreeBSD.org>
Date: Tue, 23 Jun 2009 13:26:39 -0400
On Sunday 21 June 2009 04:20 am, Roman Divacky wrote:
> 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)
> _at__at_ -443,7 +443,7 _at__at_
>         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" ;)

Just for the record, it seems this bug was fixed in NetBSD long ago:

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ieee1394/fwdev.c.diff?r1=1.3&r2=1.4

I hope it boosts your confidence level a bit. :-)

Jung-uk Kim
Received on Tue Jun 23 2009 - 15:26:52 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:50 UTC