Constify option structures
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | extensions: libebt_limit: Constify option structextensions/ | +1 | 0 replies | |
| 2/4 | extenstions: libebt_mark_m: Constify option structextensions/ | +1 | 0 replies | |
| 3/4 | extensions: libebt_mark: Constify option structextensions/ | +1 | 0 replies | |
| 4/4 | extensions: libebt_nflog: Constify option structextensions/ | +1 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] Constify option structures
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(-)
Signature · 1 line
2.7.4