]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
iptables: extensions: Remove typedef in struct.
authorArushi Singhal <arushisinghal19971997@gmail.com>
Thu, 30 Mar 2017 09:04:05 +0000 (14:34 +0530)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 7 Apr 2017 18:34:52 +0000 (20:34 +0200)
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
extensions/libebt_log.c

index 0799185d2338ea8e0c35f745c4c30da51c01bc69..f170af0334ee184961ad039139221885282ccf89 100644 (file)
 #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 },