lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.0911240027280.19211@melkinpaasi.cs.helsinki.fi>
Date:	Tue, 24 Nov 2009 00:32:54 +0200 (EET)
From:	"Ilpo Järvinen" <ilpo.jarvinen@...sinki.fi>
To:	Joe Perches <joe@...ches.com>
cc:	David Miller <davem@...emloft.net>,
	william.allen.simpson@...il.com, Netdev <netdev@...r.kernel.org>
Subject: Re: [net-next-2.6 PATCH] net/ipv4: Move && and || to end of previous
 line

On Mon, 23 Nov 2009, Joe Perches wrote:

> On Tue, 2009-11-24 at 00:08 +0200, Ilpo Järvinen wrote:
> > Certainly better in general already but there is still some work to be 
> > done here as now you have an && only line. I guess it mostly has to do 
> > with comments but #if... blahblahs could be another type of failure (in 
> > automation like this).
> 
> The current form is
> 
> 	if (foo 
> #ifdef BAR
> 	    && bar
> #endif
> 	   )
> 
> Another option could be:
> 
> #ifdef BAR
> 	if (foo && bar)
> #else
> 	if (foo)
> #endif
> 
> In any case, it won't be pretty.

But wouldn't your automation produce:

#ifdef BAR
	if (foo
#endif
	    &&
	    bar

? Like it did for the case where there was a comment between.

As I didn't go through the whole patch I don't know if there were in fact 
any #if things that got made into that kind of construct or not (just 
mentioned it that such places might also be affected incorrectly by your 
automation). I only noticed one of such after comment (ie., && on 
otherwise empty line) and hit reply.

-- 
 i.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ