tc: f_u32: add missing spaces around operators
Subsystems (2)
PATCH 1/3 tc: f_u32: add missing spaces around operators
Signed-off-by Luca Lemmo <[email protected]>
--- tc/f_u32.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
tc/f_u32.c +6 -6
@@ -47,7 +47,7 @@ static void explain(void)static int get_u32_handle (__u32 *handle,const char *str) { -__u32 htid=0 , hash=0 , nodeid=0 ; +__u32 htid =0 , hash =0 , nodeid =0 ;char *tmp =strchr (str,':' );if (tmp ==NULL ) {
@@ -58,21 +58,21 @@ static int get_u32_handle(__u32 *handle, const char *str) htid =strtoul (str, &tmp,16 );if (tmp == str && *str !=':' && *str !=0 )return -1 ; -if (htid>=0x1000 ) +if (htid >=0x1000 )return -1 ;if (*tmp) { str = tmp +1 ; hash =strtoul (str, &tmp,16 );if (tmp == str && *str !=':' && *str !=0 )return -1 ; -if (hash>=0x100 ) +if (hash >=0x100 )return -1 ;if (*tmp) { str = tmp +1 ; nodeid =strtoul (str, &tmp,16 );if (tmp == str && *str !=0 )return -1 ; -if (nodeid>=0x1000 ) +if (nodeid >=0x1000 )return -1 ; } }
@@ -122,7 +122,7 @@ static int pack_key(struct tc_u32_sel *sel, __u32 key, __u32 mask, key &= mask; -for (i=0 ; i<hwm; i++) { +for (i =0 ; i < hwm; i++) {if (sel->keys[i].off == off && sel->keys[i].offmask == offmask) {__u32 intersect = mask & sel->keys[i].mask;
@@ -1244,7 +1244,7 @@ static int u32_print_opt(struct filter_util *qu, FILE *f, struct rtattr *opt,if (sel) {if (sel->nkeys) {int i; -for (i=0 ; i<sel->nkeys; i++) { +for (i =0 ; i < sel->nkeys; i++) {show_keys (f, sel->keys + i);if (show_stats &&NULL != pf) fprintf(f, " (success %llu ) ",
Signature · 1 line
2.7.3
PATCH 2/3 tc: f_u32: trivial coding style cleanups
Signed-off-by Luca Lemmo <[email protected]>
--- tc/f_u32.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tc/f_u32.c +4 -4
@@ -80,7 +80,7 @@ static int get_u32_handle(__u32 *handle, const char *str)return 0 ; } -static char *sprint_u32_handle (__u32 handle,char *buf) +static char *sprint_u32_handle (__u32 handle,char *buf) {int bsize =SPRINT_BSIZE -1 ;__u32 htid =TC_U32_HTID (handle);
@@ -382,7 +382,7 @@ static int parse_ip6_addr(int *argc_p, char ***argv_p, plen = addr.bitlen;for (i =0 ; i < plen; i +=32 ) { -// if (((i + 31) & ~0x1F) <= plen) { +/* if (((i + 31) & ~0x1F) <= plen) { */ if (i +31 <= plen) { res =pack_key (sel, addr.data[i /32 ],0xFFFFFFFF , off +4 * (i /32 ), offmask);
@@ -1109,14 +1109,14 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,continue ; }else if (strcmp (*argv,"indev" ) ==0 ) {char ind[IFNAMSIZ +1 ]; -memset (ind,0 ,sizeof (ind)); +memset (ind,0 ,sizeof (ind)); argc--; argv++;if (argc <1 ) {fprintf (stderr,"Illegal indev\n" );return -1 ; } -strncpy (ind, *argv,sizeof (ind) -1 ); +strncpy (ind, *argv,sizeof (ind) -1 );addattr_l (n,MAX_MSG ,TCA_U32_INDEV , ind,strlen (ind) +1 ); }else if (matches (*argv,"action" ) ==0 ) {
Signature · 1 line
2.7.3
PATCH 3/3 tc: q_{codel,fq_codel}: add missing space in help text
In reply to Luca LemmoSigned-off-by Luca Lemmo <[email protected]>
--- tc/q_codel.c | 2 +- tc/q_fq_codel.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tc/q_codel.c +1 -1
@@ -53,7 +53,7 @@static void explain (void ) { -fprintf (stderr,"Usage: ... codel [ limit PACKETS ] [ target TIME]\n" ); +fprintf (stderr,"Usage: ... codel [ limit PACKETS ] [ target TIME ]\n" );fprintf (stderr," [ interval TIME ] [ ecn | noecn ]\n" );fprintf (stderr," [ ce_threshold TIME ]\n" ); }
tc/q_fq_codel.c +1 -1
@@ -51,7 +51,7 @@static void explain (void ) {fprintf (stderr,"Usage: ... fq_codel [ limit PACKETS ] [ flows NUMBER ]\n" ); -fprintf (stderr," [ target TIME] [ interval TIME ]\n" ); +fprintf (stderr," [ target TIME ] [ interval TIME ]\n" );fprintf (stderr," [ quantum BYTES ] [ [no]ecn ]\n" );fprintf (stderr," [ ce_threshold TIME ]\n" ); }
Signature · 1 line
2.7.3
Quoted 1 line · On Wed, 16 Mar 2016 17:56:12 +0100 Luca Lemmo <[email protected]> wrote:
Signed-off-by Luca Lemmo <[email protected]>
All applied,