C99 initializers for libip6t_ah.c
PATCH 1/1 C99 initializers for libip6t_ah.c
Harald,
this patch includes C99 initializers and indentation cleanups forlibip6t_ah.c.
Please apply.
Stephane Ouellette
userspace/extensions/libip6t_ah.c +17 -19
@@ -21,10 +21,10 @@ }static struct option opts[] = { - {"ahspi" ,1 ,0 ,'1' }, - {"ahlen" ,1 ,0 ,'2' }, - {"ahres" ,0 ,0 ,'3' }, - {0 } + { .name ="ahspi" , .has_arg =1 , .flag =0 , .val ='1' }, + { .name ="ahlen" , .has_arg =1 , .flag =0 , .val ='2' }, + { .name ="ahres" , .has_arg =0 , .flag =0 , .val ='3' }, + { .name =0 } }; static u_int32_t
@@ -33,7 +33,7 @@unsigned long int spi;char * ep; - spi =strtoul (spistr,&ep,0 ) ; + spi =strtoul (spistr, &ep,0 );if ( spistr == ep ) { exit_error(PARAMETER_PROBLEM,
@@ -212,23 +212,21 @@if (ahinfo->hdrres !=0 ) {printf ("--ahres " ); } - }static -struct ip6tables_match ah -= {NULL , -"ah" , -IPTABLES_VERSION , -IP6T_ALIGN (sizeof (struct ip6t_ah )), -IP6T_ALIGN (sizeof (struct ip6t_ah )), - &help, - &init, - &parse, - &final_check, - &print, - &save, - opts +struct ip6tables_match ah = { + .name ="ah" , + .version =IPTABLES_VERSION , + .size =IP6T_ALIGN (sizeof (struct ip6t_ah )), + .userspacesize =IP6T_ALIGN (sizeof (struct ip6t_ah )), + .help = &help, + .init = &init, + .parse = &parse, + .final_check = &final_check, + .print = &print, + .save = &save, + .extra_opts = opts };void