Re: kernel coding style for if ... else which cross #ifdef

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Willy Tarreau <w@...>
Cc: Steve French <smfrench@...>, lkml <linux-kernel@...>
Date: Friday, May 23, 2008 - 4:49 pm

On Fri, May 23, 2008 at 10:42:28PM +0200, Willy Tarreau wrote:

I would consider the first one much harder to read since you can _very_ 
easily miss that the "if" is in an "else" clause and completely misread 
the code.


I'd also say that's the best solution.


cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
kernel coding style for if ... else which cross #ifdef, Steve French, (Fri May 23, 3:11 pm)
Re: kernel coding style for if ... else which cross #ifdef, H. Peter Anvin, (Fri May 23, 7:03 pm)
Re: kernel coding style for if ... else which cross #ifdef, H. Peter Anvin, (Sat May 24, 1:42 am)
Re: kernel coding style for if ... else which cross #ifdef, H. Peter Anvin, (Sat May 24, 2:08 pm)
Re: kernel coding style for if ... else which cross #ifdef, Jeremy Fitzhardinge, (Sat May 24, 6:06 am)
Re: kernel coding style for if ... else which cross #ifdef, Jeremy Fitzhardinge, (Sat May 24, 10:35 am)
Re: kernel coding style for if ... else which cross #ifdef, Jeremy Fitzhardinge, (Sat May 24, 11:45 am)
Re: kernel coding style for if ... else which cross #ifdef, H. Peter Anvin, (Sat May 24, 2:12 pm)
Re: kernel coding style for if ... else which cross #ifdef, Vegard Nossum, (Sat May 24, 11:57 am)
Re: kernel coding style for if ... else which cross #ifdef, H. Peter Anvin, (Sat May 24, 2:12 pm)
Re: kernel coding style for if ... else which cross #ifdef, Jeremy Fitzhardinge, (Sat May 24, 12:02 pm)
Re: kernel coding style for if ... else which cross #ifdef, Jeremy Fitzhardinge, (Sat May 24, 4:38 pm)
Re: kernel coding style for if ... else which cross #ifdef, H. Peter Anvin, (Sat May 24, 4:43 pm)
Re: kernel coding style for if ... else which cross #ifdef, Jeremy Fitzhardinge, (Sat May 24, 4:51 pm)
Re: kernel coding style for if ... else which cross #ifdef, H. Peter Anvin, (Sat May 24, 4:54 pm)
Re: kernel coding style for if ... else which cross #ifdef, Jeremy Fitzhardinge, (Sat May 24, 5:15 pm)
Re: kernel coding style for if ... else which cross #ifdef, H. Peter Anvin, (Sun May 25, 8:27 pm)
Re: kernel coding style for if ... else which cross #ifdef, Willy Tarreau, (Sat May 24, 10:39 am)
Re: kernel coding style for if ... else which cross #ifdef, Jeremy Fitzhardinge, (Sat May 24, 10:41 am)
Re: kernel coding style for if ... else which cross #ifdef, Willy Tarreau, (Sat May 24, 10:46 am)
Re: kernel coding style for if ... else which cross #ifdef, Adrian Bunk, (Fri May 23, 4:49 pm)