* [PATCH] iptables: extensions: Remove typedef in struct.
@ 2017-03-30 9:04 Arushi Singhal
0 siblings, 0 replies; only message in thread
From: Arushi Singhal @ 2017-03-30 9:04 UTC (permalink / raw)
To: outreachy-kernel; +Cc: netfilter-devel
The Linux kernel coding style guidelines suggest not using typedefs for
structure. This patch gets rid of the typedefs for "_code".
The following Coccinelle semantic patch detects the cases for struct
type:
@tn@
identifier i;
type td;
@@
-typedef
struct i { ... }
-td
;
@@
type tn.td;
identifier tn.i;
@@
-td
+ struct i
Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com>
---
extensions/libebt_log.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/extensions/libebt_log.c b/extensions/libebt_log.c
index 0799185..f170af0 100644
--- a/extensions/libebt_log.c
+++ b/extensions/libebt_log.c
@@ -27,12 +27,12 @@
#define LOG_LOG '5'
#define LOG_IP6 '6'
-typedef struct _code {
+struct code {
char *c_name;
int c_val;
-} CODE;
+};
-static CODE eight_priority[] = {
+static struct code eight_priority[] = {
{ "emerg", LOG_EMERG },
{ "alert", LOG_ALERT },
{ "crit", LOG_CRIT },
--
2.11.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-30 9:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-30 9:04 [PATCH] iptables: extensions: Remove typedef in struct Arushi Singhal
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).