* [PATCH 1/3] tc: f_u32: add missing spaces around operators
@ 2016-03-16 16:56 Luca Lemmo
2016-03-16 16:56 ` [PATCH 2/3] tc: f_u32: trivial coding style cleanups Luca Lemmo
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Luca Lemmo @ 2016-03-16 16:56 UTC (permalink / raw)
To: stephen; +Cc: netdev, Luca Lemmo
Signed-off-by: Luca Lemmo <luca@linux.com>
---
tc/f_u32.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tc/f_u32.c b/tc/f_u32.c
index 0b97678..2a6c971 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -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 ) ",
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] tc: f_u32: trivial coding style cleanups
2016-03-16 16:56 [PATCH 1/3] tc: f_u32: add missing spaces around operators Luca Lemmo
@ 2016-03-16 16:56 ` Luca Lemmo
2016-03-16 16:56 ` [PATCH 3/3] tc: q_{codel,fq_codel}: add missing space in help text Luca Lemmo
2016-03-21 18:53 ` [PATCH 1/3] tc: f_u32: add missing spaces around operators Stephen Hemminger
2 siblings, 0 replies; 4+ messages in thread
From: Luca Lemmo @ 2016-03-16 16:56 UTC (permalink / raw)
To: stephen; +Cc: netdev, Luca Lemmo
Signed-off-by: Luca Lemmo <luca@linux.com>
---
tc/f_u32.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tc/f_u32.c b/tc/f_u32.c
index 2a6c971..5ca60c8 100644
--- a/tc/f_u32.c
+++ b/tc/f_u32.c
@@ -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) {
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] tc: q_{codel,fq_codel}: add missing space in help text
2016-03-16 16:56 [PATCH 1/3] tc: f_u32: add missing spaces around operators Luca Lemmo
2016-03-16 16:56 ` [PATCH 2/3] tc: f_u32: trivial coding style cleanups Luca Lemmo
@ 2016-03-16 16:56 ` Luca Lemmo
2016-03-21 18:53 ` [PATCH 1/3] tc: f_u32: add missing spaces around operators Stephen Hemminger
2 siblings, 0 replies; 4+ messages in thread
From: Luca Lemmo @ 2016-03-16 16:56 UTC (permalink / raw)
To: stephen; +Cc: netdev, Luca Lemmo
Signed-off-by: Luca Lemmo <luca@linux.com>
---
tc/q_codel.c | 2 +-
tc/q_fq_codel.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tc/q_codel.c b/tc/q_codel.c
index c24246c..cff609e 100644
--- a/tc/q_codel.c
+++ b/tc/q_codel.c
@@ -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");
}
diff --git a/tc/q_fq_codel.c b/tc/q_fq_codel.c
index 4f747eb..0392c64 100644
--- a/tc/q_fq_codel.c
+++ b/tc/q_fq_codel.c
@@ -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");
}
--
2.7.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] tc: f_u32: add missing spaces around operators
2016-03-16 16:56 [PATCH 1/3] tc: f_u32: add missing spaces around operators Luca Lemmo
2016-03-16 16:56 ` [PATCH 2/3] tc: f_u32: trivial coding style cleanups Luca Lemmo
2016-03-16 16:56 ` [PATCH 3/3] tc: q_{codel,fq_codel}: add missing space in help text Luca Lemmo
@ 2016-03-21 18:53 ` Stephen Hemminger
2 siblings, 0 replies; 4+ messages in thread
From: Stephen Hemminger @ 2016-03-21 18:53 UTC (permalink / raw)
To: Luca Lemmo; +Cc: netdev
On Wed, 16 Mar 2016 17:56:12 +0100
Luca Lemmo <luca@linux.com> wrote:
> Signed-off-by: Luca Lemmo <luca@linux.com>
All applied,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-03-21 19:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-16 16:56 [PATCH 1/3] tc: f_u32: add missing spaces around operators Luca Lemmo
2016-03-16 16:56 ` [PATCH 2/3] tc: f_u32: trivial coding style cleanups Luca Lemmo
2016-03-16 16:56 ` [PATCH 3/3] tc: q_{codel,fq_codel}: add missing space in help text Luca Lemmo
2016-03-21 18:53 ` [PATCH 1/3] tc: f_u32: add missing spaces around operators Stephen Hemminger
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).