iptables: extensions: Add space around operators
PATCH 1/1 iptables: extensions: Add space around operators
Add spaces around operator and remove trailing whitespaces.
Signed-off-by Arushi Singhal <[email protected]>
--- extensions/dscp_helper.c | 2 +- extensions/libarpt_mangle.c | 2 +- extensions/libip6t_ah.c | 2 +- extensions/libip6t_dst.c | 6 +++--- extensions/libip6t_frag.c | 2 +- extensions/libip6t_hbh.c | 10 +++++----- 6 files changed, 12 insertions(+), 12 deletions(-)
extensions/dscp_helper.c +1 -1
@@ -68,7 +68,7 @@ dscp_to_name(unsigned int dscp) {int i; -for (i =0 ; i <ARRAY_SIZE (ds_classes); ++i) +for (i =0 ; i <ARRAY_SIZE (ds_classes); ++i)if (dscp == ds_classes[i].dscp)return ds_classes[i].name;
extensions/libarpt_mangle.c +1 -1
@@ -136,7 +136,7 @@ static void print_mac(const unsigned char *mac, int l)for (j =0 ; j < l; j++)printf ("%02x%s" , mac[j], - (j==l-1 ) ?"" :":" ); + (j == l-1 ) ?"" :":" ); } static void
extensions/libip6t_ah.c +1 -1
@@ -89,7 +89,7 @@ static void ah_print(const void *ip, const struct xt_entry_match *match,printf (" ah " );print_spis ("spi" , ah->spis[0 ], ah->spis[1 ], ah->invflags &IP6T_AH_INV_SPI ); -print_len ("length" , ah->hdrlen, +print_len ("length" , ah->hdrlen, ah->invflags &IP6T_AH_INV_LEN );if (ah->hdrres)
extensions/libip6t_dst.c +3 -3
@@ -57,17 +57,17 @@ parse_options(const char *optsstr, uint16_t *opts) {char *buffer, *cp, *next, *range;unsigned int i; - + buffer =strdup (optsstr);if (!buffer)xtables_error (OTHER_PROBLEM ,"strdup failed" ); - +for (cp = buffer, i =0 ; cp && i <IP6T_OPTS_OPTSNR ; cp = next, i++) { next =strchr (cp,',' );if (next) - *next++='\0' ; + *next++ ='\0' ; range =strchr (cp,':' );
extensions/libip6t_frag.c +1 -1
@@ -178,7 +178,7 @@ static int frag_xlate(struct xt_xlate *xl, {const struct ip6t_frag *fraginfo = (struct ip6t_frag *)params->match->data; -char *space="" ; +char *space ="" ;if (!(fraginfo->ids[0 ] ==0 && fraginfo->ids[1 ] ==0xFFFFFFFF )) { xt_xlate_add(xl, "frag id %s",
extensions/libip6t_hbh.c +5 -5
@@ -63,10 +63,10 @@ parse_options(const char *optsstr, uint16_t *opts) buffer =strdup (optsstr);if (!buffer)xtables_error (OTHER_PROBLEM ,"strdup failed" ); -for (cp=buffer, i=0 ; cp && i<IP6T_OPTS_OPTSNR ; cp=next,i++) +for (cp = buffer, i =0 ; cp && i <IP6T_OPTS_OPTSNR ; cp = next,i++) { - next=strchr (cp,',' ); -if (next) *next++='\0' ; + next =strchr (cp,',' ); +if (next) *next++ ='\0' ; range =strchr (cp,':' );if (range) {if (i ==IP6T_OPTS_OPTSNR -1 )
@@ -122,8 +122,8 @@ print_options(unsigned int optsnr, uint16_t *optsp) {unsigned int i; -for (i=0 ; i<optsnr; i++){ -printf ("%c" , (i==0 )?' ' :',' ); +for (i =0 ; i < optsnr; i++){ +printf ("%c" , (i ==0 )?' ' :',' );printf ("%d" , (optsp[i] &0xFF00 )>>8 );if ((optsp[i] &0x00FF ) !=0x00FF ){printf (":%d" , (optsp[i] &0x00FF ));
Signature · 1 line
2.11.0