netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ebtables: Constify option struct
@ 2017-03-28 11:27 Gargi Sharma
  2017-03-28 11:27 ` [PATCH 1/3] ebtables: extensions: " Gargi Sharma
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Gargi Sharma @ 2017-03-28 11:27 UTC (permalink / raw)
  To: netfilter-devel; +Cc: pablo, outreachy-kernel, Gargi Sharma

The struct option is generally used only to initialise
fields inside certain structs 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[] = { ... };

Gargi Sharma (3):
  ebtables: extensions: Constify option struct
  ebtables: extensions: Constify option struct
  ebtables: extensions: Constify option struct

 extensions/ebt_802_3.c    | 2 +-
 extensions/ebt_among.c    | 2 +-
 extensions/ebt_arp.c      | 2 +-
 extensions/ebt_arpreply.c | 2 +-
 extensions/ebt_inat.c     | 4 ++--
 extensions/ebt_ip.c       | 2 +-
 extensions/ebt_limit.c    | 2 +-
 extensions/ebt_log.c      | 2 +-
 extensions/ebt_mark.c     | 2 +-
 extensions/ebt_mark_m.c   | 2 +-
 extensions/ebt_nat.c      | 4 ++--
 extensions/ebt_nflog.c    | 2 +-
 extensions/ebt_pkttype.c  | 2 +-
 extensions/ebt_redirect.c | 2 +-
 extensions/ebt_standard.c | 2 +-
 extensions/ebt_stp.c      | 2 +-
 extensions/ebt_ulog.c     | 2 +-
 extensions/ebt_vlan.c     | 2 +-
 18 files changed, 20 insertions(+), 20 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-03-28 12:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-28 11:27 [PATCH 0/3] ebtables: Constify option struct Gargi Sharma
2017-03-28 11:27 ` [PATCH 1/3] ebtables: extensions: " Gargi Sharma
2017-03-28 11:27 ` [PATCH 2/3] " Gargi Sharma
2017-03-28 11:27 ` [PATCH 3/3] " Gargi Sharma
2017-03-28 12:22 ` [PATCH 0/3] ebtables: " Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).