Re: [PATCH iproute2 1/1] tc: pass correct conversion specifier to print 'unsigned int' action index.

2016-12-14 Thread Stephen Hemminger
On Tue, 13 Dec 2016 15:31:16 -0500
Roman Mashak  wrote:

> Signed-off-by: Roman Mashak 
> Signed-off-by: Jamal Hadi Salim 

Applied. There are lots of unsigned vs signed int things lurking in code.



[PATCH iproute2 1/1] tc: pass correct conversion specifier to print 'unsigned int' action index.

2016-12-13 Thread Roman Mashak
Signed-off-by: Roman Mashak 
Signed-off-by: Jamal Hadi Salim 
---
 tc/m_bpf.c  | 2 +-
 tc/m_connmark.c | 2 +-
 tc/m_csum.c | 3 ++-
 tc/m_gact.c | 3 ++-
 tc/m_ife.c  | 2 +-
 tc/m_ipt.c  | 2 +-
 tc/m_mirred.c   | 3 ++-
 tc/m_pedit.c| 2 +-
 tc/m_simple.c   | 2 +-
 tc/m_skbedit.c  | 2 +-
 tc/m_skbmod.c   | 2 +-
 tc/m_vlan.c | 2 +-
 tc/m_xt.c   | 2 +-
 tc/m_xt_old.c   | 2 +-
 14 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/tc/m_bpf.c b/tc/m_bpf.c
index 9bf2a85..6400724 100644
--- a/tc/m_bpf.c
+++ b/tc/m_bpf.c
@@ -161,7 +161,7 @@ static int bpf_print_opt(struct action_util *au, FILE *f, 
struct rtattr *arg)
}
 
fprintf(f, "default-action %s\n", action_n2a(parm->action));
-   fprintf(f, "\tindex %d ref %d bind %d", parm->index, parm->refcnt,
+   fprintf(f, "\tindex %u ref %d bind %d", parm->index, parm->refcnt,
parm->bindcnt);
 
if (show_stats) {
diff --git a/tc/m_connmark.c b/tc/m_connmark.c
index 20f98e4..295f90d 100644
--- a/tc/m_connmark.c
+++ b/tc/m_connmark.c
@@ -123,7 +123,7 @@ static int print_connmark(struct action_util *au, FILE *f, 
struct rtattr *arg)
ci = RTA_DATA(tb[TCA_CONNMARK_PARMS]);
 
fprintf(f, " connmark zone %d\n", ci->zone);
-   fprintf(f, "\t index %d ref %d bind %d", ci->index,
+   fprintf(f, "\t index %u ref %d bind %d", ci->index,
ci->refcnt, ci->bindcnt);
 
if (show_stats) {
diff --git a/tc/m_csum.c b/tc/m_csum.c
index a6e4c1e..d5b1af6 100644
--- a/tc/m_csum.c
+++ b/tc/m_csum.c
@@ -199,7 +199,8 @@ print_csum(struct action_util *au, FILE *f, struct rtattr 
*arg)
uflag_1, uflag_2, uflag_3,
uflag_4, uflag_5, uflag_6,
action_n2a(sel->action));
-   fprintf(f, "\tindex %d ref %d bind %d", sel->index, sel->refcnt, 
sel->bindcnt);
+   fprintf(f, "\tindex %u ref %d bind %d", sel->index, sel->refcnt,
+   sel->bindcnt);
 
if (show_stats) {
if (tb[TCA_CSUM_TM]) {
diff --git a/tc/m_gact.c b/tc/m_gact.c
index dc04b9f..755a3be 100644
--- a/tc/m_gact.c
+++ b/tc/m_gact.c
@@ -224,7 +224,8 @@ print_gact(struct action_util *au, FILE * f, struct rtattr 
*arg)
fprintf(f, "\n\t random type %s %s val %d",
prob_n2a(pp->ptype), action_n2a(pp->paction), pp->pval);
 #endif
-   fprintf(f, "\n\t index %d ref %d bind %d", p->index, p->refcnt, 
p->bindcnt);
+   fprintf(f, "\n\t index %u ref %d bind %d", p->index, p->refcnt,
+   p->bindcnt);
if (show_stats) {
if (tb[TCA_GACT_TM]) {
struct tcf_t *tm = RTA_DATA(tb[TCA_GACT_TM]);
diff --git a/tc/m_ife.c b/tc/m_ife.c
index e6f6153..f6131b1 100644
--- a/tc/m_ife.c
+++ b/tc/m_ife.c
@@ -312,7 +312,7 @@ static int print_ife(struct action_util *au, FILE *f, 
struct rtattr *arg)
sizeof(b2)));
}
 
-   fprintf(f, "\n\t index %d ref %d bind %d", p->index, p->refcnt,
+   fprintf(f, "\n\t index %u ref %d bind %d", p->index, p->refcnt,
p->bindcnt);
if (show_stats) {
if (tb[TCA_IFE_TM]) {
diff --git a/tc/m_ipt.c b/tc/m_ipt.c
index d6f62bd..1b935ec 100644
--- a/tc/m_ipt.c
+++ b/tc/m_ipt.c
@@ -489,7 +489,7 @@ print_ipt(struct action_util *au, FILE * f, struct rtattr 
*arg)
__u32 index;
 
index = rta_getattr_u32(tb[TCA_IPT_INDEX]);
-   fprintf(f, "\n\tindex %d", index);
+   fprintf(f, "\n\tindex %u", index);
}
 
if (tb[TCA_IPT_CNT]) {
diff --git a/tc/m_mirred.c b/tc/m_mirred.c
index 11f4c9b..35ae21f 100644
--- a/tc/m_mirred.c
+++ b/tc/m_mirred.c
@@ -260,7 +260,8 @@ print_mirred(struct action_util *au, FILE * f, struct 
rtattr *arg)
mirred_n2a(p->eaction), dev, action_n2a(p->action));
 
fprintf(f, "\n ");
-   fprintf(f, "\tindex %d ref %d bind %d", p->index, p->refcnt, 
p->bindcnt);
+   fprintf(f, "\tindex %u ref %d bind %d", p->index, p->refcnt,
+   p->bindcnt);
 
if (show_stats) {
if (tb[TCA_MIRRED_TM]) {
diff --git a/tc/m_pedit.c b/tc/m_pedit.c
index 891c2ec..8e9bf07 100644
--- a/tc/m_pedit.c
+++ b/tc/m_pedit.c
@@ -527,7 +527,7 @@ int print_pedit(struct action_util *au, FILE *f, struct 
rtattr *arg)
 
fprintf(f, " pedit action %s keys %d\n ",
action_n2a(sel->action), sel->nkeys);
-   fprintf(f, "\t index %d ref %d bind %d", sel->index, sel->refcnt,
+   fprintf(f, "\t index %u ref %d bind %d", sel->index, sel->refcnt,
sel->bindcnt);
 
if (show_stats) {
diff --git a/tc/m_simple.c b/tc/m_simple.c
index 732eaf1..3a8bd91 100644
--- a/tc/m_simple.c
+++ b/tc/m_simple.c
@@ -187,7 +187,7 @@ static int print_simple(struct action_util *au, FILE *f, 
struct rtattr *arg)
simpdata = RTA_DATA(tb[TCA_DEF_DATA]);
 
fprintf(f, "Simple