tc: f_u32: add missing spaces around operators
Signed-off-by: Luca Lemmo <luca@linux.com>
This commit is contained in:
parent
ba0372670d
commit
dd0c8d193f
12
tc/f_u32.c
12
tc/f_u32.c
|
|
@ -47,7 +47,7 @@ static void explain(void)
|
||||||
|
|
||||||
static int get_u32_handle(__u32 *handle, const char *str)
|
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, ':');
|
char *tmp = strchr(str, ':');
|
||||||
|
|
||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
|
|
@ -58,21 +58,21 @@ static int get_u32_handle(__u32 *handle, const char *str)
|
||||||
htid = strtoul(str, &tmp, 16);
|
htid = strtoul(str, &tmp, 16);
|
||||||
if (tmp == str && *str != ':' && *str != 0)
|
if (tmp == str && *str != ':' && *str != 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (htid>=0x1000)
|
if (htid >= 0x1000)
|
||||||
return -1;
|
return -1;
|
||||||
if (*tmp) {
|
if (*tmp) {
|
||||||
str = tmp + 1;
|
str = tmp + 1;
|
||||||
hash = strtoul(str, &tmp, 16);
|
hash = strtoul(str, &tmp, 16);
|
||||||
if (tmp == str && *str != ':' && *str != 0)
|
if (tmp == str && *str != ':' && *str != 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (hash>=0x100)
|
if (hash >= 0x100)
|
||||||
return -1;
|
return -1;
|
||||||
if (*tmp) {
|
if (*tmp) {
|
||||||
str = tmp + 1;
|
str = tmp + 1;
|
||||||
nodeid = strtoul(str, &tmp, 16);
|
nodeid = strtoul(str, &tmp, 16);
|
||||||
if (tmp == str && *str != 0)
|
if (tmp == str && *str != 0)
|
||||||
return -1;
|
return -1;
|
||||||
if (nodeid>=0x1000)
|
if (nodeid >= 0x1000)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -122,7 +122,7 @@ static int pack_key(struct tc_u32_sel *sel, __u32 key, __u32 mask,
|
||||||
|
|
||||||
key &= 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) {
|
if (sel->keys[i].off == off && sel->keys[i].offmask == offmask) {
|
||||||
__u32 intersect = mask & sel->keys[i].mask;
|
__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) {
|
||||||
if (sel->nkeys) {
|
if (sel->nkeys) {
|
||||||
int i;
|
int i;
|
||||||
for (i=0; i<sel->nkeys; i++) {
|
for (i = 0; i < sel->nkeys; i++) {
|
||||||
show_keys(f, sel->keys + i);
|
show_keys(f, sel->keys + i);
|
||||||
if (show_stats && NULL != pf)
|
if (show_stats && NULL != pf)
|
||||||
fprintf(f, " (success %llu ) ",
|
fprintf(f, " (success %llu ) ",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue