extensions: libxt_hashlimit: fix 64-bit printf format
PATCH 1/1 extensions: libxt_hashlimit: fix 64-bit printf format
Furthermore, this extension use a mix of PRIu64 and %llu formats for uint64_t values. IMO it should use only one, for the sake of consistency.
--- extensions/libxt_hashlimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
extensions/libxt_hashlimit.c +1 -1
@@ -942,7 +942,7 @@ static void print_packets_rate_xlate(struct xt_xlate *xl, uint64_t avg, _rates[i].mult / avg < _rates[i].mult % avg) break; -xt_xlate_add (xl," %llu/%s burst %lu packets" , +xt_xlate_add (xl," %llu/%s burst " PRIu64" packets" , _rates[i-1 ].mult / avg, _rates[i-1 ].name, burst); }
Signature · 1 line
2.7.4
Pablo Neira Ayuso
maintainerQuoted 13 lines · Alin Nastac
Furthermore, this extension use a mix of PRIu64 and %llu formats for
uint64_tvalues. IMO it should use only one, for the sake of consistency.Signed-off-by Alin Nastac <[email protected]>--- extensions/libxt_hashlimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)extensions/libxt_hashlimit.c +0
-0
extensions/libxt_hashlimit.c static void print_packets_rate_xlate(struct xt_xlate *xl, uint64_t avg, · line 945
Quoted 5 lines
extensions/libxt_hashlimit.c +1
-1@@ -942,7 +942,7 @@ static void print_packets_rate_xlate(struct xt_xlate *xl, uint64_t avg, _rates[i].mult / avg < _rates[i].mult % avg)break ; - xt_xlate_add(xl, " %llu/%s burst %lu packets", + xt_xlate_add(xl, " %llu/%s burst "PRIu64" packets",
^
missing % here?
Pablo Neira Ayuso
maintainerQuoted 17 lines · Pablo Neira Ayuso
Quoted 16 lines · Alin Nastac
Furthermore, this extension use a mix of PRIu64 and %llu formats for
uint64_tvalues. IMO it should use only one, for the sake of consistency.Signed-off-by Alin Nastac <[email protected]>--- extensions/libxt_hashlimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)extensions/libxt_hashlimit.c +0
-0@@ -942,7 +942,7 @@ static void print_packets_rate_xlate(struct xt_xlate *xl, uint64_t avg, _rates[i].mult / avg < _rates[i].mult % avg)break ;
Quoted 4 lines
extensions/libxt_hashlimit.c static void print_packets_rate_xlate(struct xt_xlate *xl, uint64_t avg, · line 945
Quoted 2 lines
extensions/libxt_hashlimit.c +1
-1- xt_xlate_add(xl, " %llu/%s burst %lu packets", + xt_xlate_add(xl, " %llu/%s burst "PRIu64" packets",^
missing % here?
OK, please revamp, thanks.