summaryrefslogtreecommitdiffstats
path: root/extensions/libxt_MARK.c
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-11-12 14:40:41 +0100
committerFlorian Westphal <fw@strlen.de>2018-11-12 18:33:03 +0100
commit61d6c3834de32c0ff5808c93da94b2b30b4791c8 (patch)
tree9286c86102bc3692e6ac30d561fd407de76c257f /extensions/libxt_MARK.c
parent5edb249b25da2d27bca886eb1aa03e6ce65cc8ca (diff)
xtables: add 'printf' attribute to xlate_add
This allows gcc to check format string vs. passed arguments. Fix the fallout from this as well, typical warning produced is: libebt_mark_m.c:112:28: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=] xt_xlate_add(xl, "and 0x%x %s0 ", info->mask, ... ~^ ~~~~~~~~~~ so add the required casts or fixup format strings as needed. libxt_conntrack also passed an unneeded argument (port), so remove that. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'extensions/libxt_MARK.c')
-rw-r--r--extensions/libxt_MARK.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions/libxt_MARK.c b/extensions/libxt_MARK.c
index 5c6186fe..43aa9779 100644
--- a/extensions/libxt_MARK.c
+++ b/extensions/libxt_MARK.c
@@ -277,13 +277,13 @@ static int MARK_xlate(struct xt_xlate *xl,
switch(markinfo->mode) {
case XT_MARK_SET:
- xt_xlate_add(xl, "0x%x ", markinfo->mark);
+ xt_xlate_add(xl, "0x%x ", (uint32_t)markinfo->mark);
break;
case XT_MARK_AND:
- xt_xlate_add(xl, "mark and 0x%x ", markinfo->mark);
+ xt_xlate_add(xl, "mark and 0x%x ", (uint32_t)markinfo->mark);
break;
case XT_MARK_OR:
- xt_xlate_add(xl, "mark or 0x%x ", markinfo->mark);
+ xt_xlate_add(xl, "mark or 0x%x ", (uint32_t)markinfo->mark);
break;
}