From: Gargi Sharma <gs051095@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: pablo@netfilter.orgm, outreachy-kernel@googlegroups.com,
Gargi Sharma <gs051095@gmail.com>
Subject: [PATCH 0/4] Constify option structures
Date: Tue, 28 Mar 2017 00:15:26 +0530 [thread overview]
Message-ID: <cover.1490640256.git.gs051095@gmail.com> (raw)
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 (4):
extensions: libebt_limit: Constify option struct
extenstions: libebt_mark_m: Constify option struct
extensions: libebt_mark: Constify option struct
extensions: libebt_nflog: Constify option struct
extensions/libebt_limit.c | 2 +-
extensions/libebt_mark.c | 2 +-
extensions/libebt_mark_m.c | 2 +-
extensions/libebt_nflog.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
--
2.7.4
next reply other threads:[~2017-03-27 18:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 18:45 Gargi Sharma [this message]
2017-03-27 18:45 ` [PATCH 1/4] extensions: libebt_limit: Constify option struct Gargi Sharma
2017-03-27 18:45 ` [PATCH 2/4] extenstions: libebt_mark_m: " Gargi Sharma
2017-03-27 18:45 ` [PATCH 3/4] extensions: libebt_mark: " Gargi Sharma
2017-03-27 18:45 ` [PATCH 4/4] extensions: libebt_nflog: " Gargi Sharma
2017-03-27 18:49 ` [Outreachy kernel] [PATCH 0/4] Constify option structures Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1490640256.git.gs051095@gmail.com \
--to=gs051095@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=pablo@netfilter.orgm \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).