Re: [Outreachy kernel] Re: [PATCH] iptables: Constify option struct

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

 




On Tue, 28 Mar 2017, Gargi Sharma wrote:

> On Tue, Mar 28, 2017 at 12:45 AM, Gargi Sharma <gs051095@xxxxxxxxx> wrote:
> > On Tue, Mar 28, 2017 at 12:42 AM, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> >>
> >> On Tue, Mar 28, 2017 at 12:40:15AM +0530, Gargi Sharma wrote:
> >> > The struct  of the type option is only used to initialise a field
> >> > inside the xtables_match struct and is not modified anywhere.
> >> > Done using Coccinelle:
> >> >
> >> > @r1 disable optional_qualifier@
> >> > identifier s,i;
> >> > position p;
> >> > @@
> >> >
> >> > static struct option i@p[] ={...};
> >> >
> >> > @ok1@
> >> > identifier r1.i;
> >> > expression e;
> >> > position p;
> >> > @@
> >> > e = i@p
> >> >
> >> > @bad@
> >> > position p != {r1.p,ok1.p};
> >> > identifier r1.i;
> >> > @@
> >> > e@i@p
> >> >
> >> > @depends on !bad disable optional_qualifier@
> >> > identifier r1.i;
> >> > @@
> >> > static
> >> > +const
> >> > struct option i[] = { ... };
> >>
> >> Applied, thanks.
> >>
> >> You can probably have a look at ebtables.git, probably there are more
> >> things to constify there.
>
> Hi Pablo,
>
> There are around 18 files being affected by this semantic patch in
> ebtables. Should I still send them as a single patch(since it might be
> difficult to review a large single patch)?

If they are just independent structures, you can cut up the patches if it
seems best.  If the changes are interdependent, then one patch would be
better.

julia

>
> Thanks!
> Gargi
> >>
> > Okay, I will. :)
> >
> > Thanks!
> > Gargi
> >> --
> >> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> >> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@xxxxxxxxxxxxxxxx.
> >> To post to this group, send email to outreachy-kernel@xxxxxxxxxxxxxxxx.
> >> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170327191239.GA18080%40salvia.
> >> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@xxxxxxxxxxxxxxxx.
> To post to this group, send email to outreachy-kernel@xxxxxxxxxxxxxxxx.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/CAOCi2DFc2aURc5gAuF5q6NLvBwiVSbF6cpoF%3DipfVwntz%3D86Hg%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux