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.02.1511040746350.2068@localhost6.localdomain6>
Date:	Wed, 4 Nov 2015 07:50:05 +0100 (CET)
From:	Julia Lawall <julia.lawall@...6.fr>
To:	Fengguang Wu <lkp@...el.com>
cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	roopa@...ulusnetworks.com, rshearma@...cade.com, kbuild-all@...org,
	ebiederm@...ssion.com
Subject: Re: [kbuild-all] [PATCH] mpls: fix semicolon.cocci warnings



On Wed, 4 Nov 2015, Fengguang Wu wrote:

> On Tue, Nov 03, 2015 at 11:17:36AM -0500, David Miller wrote:
> > From: kbuild test robot <lkp@...el.com>
> > Date: Tue, 3 Nov 2015 23:25:39 +0800
> > 
> > > net/mpls/af_mpls.c:722:22-23: Unneeded semicolon
> > > 
> > > 
> > >  Remove unneeded semicolon.
> > > 
> > > Generated by: scripts/coccinelle/misc/semicolon.cocci
> > > 
> > > CC: Roopa Prabhu <roopa@...ulusnetworks.com>
> > > Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
> > > ---
> > > 
> > >  af_mpls.c |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > --- a/net/mpls/af_mpls.c
> > > +++ b/net/mpls/af_mpls.c
> > > @@ -719,9 +719,9 @@ static int mpls_nh_build_multi(struct mp
> > >  
> > >  		rtnh = rtnh_next(rtnh, &remaining);
> > >  		nhs++;
> > > -	} endfor_nexthops(rt);
> > > +	} endfor_nexthops(rt)
> > >  
> > > -	rt->rt_nhn = nhs;
> > > +		rt->rt_nhn = nhs;
> > 
> > This new indentation of "rt->rt_nhn = nhs;" is not correct.
> 
> Yes. CC Julia for coccinelle.

I will look into it, but Coccinelle is probably thrown off by there being 
what looks like a function call on the same line as a close brace.

I saw that quite a lot of other calls to endfor_nexthops also have 
semicolons.

The whole idea of a macro that declares variables some of which are then 
used in the code under the macro also seems quite unpleasant.  Other 
iterators don't do this, and so they don't need the end marker.

julia
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ