NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/44800: Misplaced parenthesis.



On Wed, Mar 30, 2011 at 12:40:00PM +0000, 
henning.petersen%t-online.de@localhost wrote:
> >Number:         44800
...
> -     if ((error = vte_dma_alloc(sc) != 0))
> +     if ((error = vte_dma_alloc(sc)) != 0)

I would fix all these by moving the assignment out of the if.
> +     error = vte_dma_alloc(sc);
> +     if (error != 0)

The code is easier to read, and has shorter lines.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index