NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/44800: Misplaced parenthesis.
The following reply was made to PR kern/44800; it has been noted by GNATS.
From: David Laight <david%l8s.co.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/44800: Misplaced parenthesis.
Date: Sat, 2 Apr 2011 18:51:35 +0100
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