summaryrefslogtreecommitdiffstats
path: root/src/obj
diff options
context:
space:
mode:
Diffstat (limited to 'src/obj')
-rw-r--r--src/obj/ct_expect.c5
-rw-r--r--src/obj/ct_timeout.c5
-rw-r--r--src/obj/synproxy.c4
3 files changed, 6 insertions, 8 deletions
diff --git a/src/obj/ct_expect.c b/src/obj/ct_expect.c
index c29f99c..8136ad9 100644
--- a/src/obj/ct_expect.c
+++ b/src/obj/ct_expect.c
@@ -151,13 +151,12 @@ nftnl_obj_ct_expect_parse(struct nftnl_obj *e, struct nlattr *attr)
return 0;
}
-static int nftnl_obj_ct_expect_snprintf(char *buf, size_t len,
+static int nftnl_obj_ct_expect_snprintf(char *buf, size_t remain,
uint32_t flags,
const struct nftnl_obj *e)
{
- int ret = 0;
- int offset = 0, remain = len;
struct nftnl_obj_ct_expect *exp = nftnl_obj_data(e);
+ int ret = 0, offset = 0;
if (e->flags & (1 << NFTNL_OBJ_CT_EXPECT_L3PROTO)) {
ret = snprintf(buf + offset, remain,
diff --git a/src/obj/ct_timeout.c b/src/obj/ct_timeout.c
index a2e5b4f..1d4f8fb 100644
--- a/src/obj/ct_timeout.c
+++ b/src/obj/ct_timeout.c
@@ -257,12 +257,11 @@ nftnl_obj_ct_timeout_parse(struct nftnl_obj *e, struct nlattr *attr)
return 0;
}
-static int nftnl_obj_ct_timeout_snprintf(char *buf, size_t len,
+static int nftnl_obj_ct_timeout_snprintf(char *buf, size_t remain,
uint32_t flags,
const struct nftnl_obj *e)
{
- int ret = 0;
- int offset = 0, remain = len;
+ int ret = 0, offset = 0;
struct nftnl_obj_ct_timeout *timeout = nftnl_obj_data(e);
diff --git a/src/obj/synproxy.c b/src/obj/synproxy.c
index e3a991b..d689fee 100644
--- a/src/obj/synproxy.c
+++ b/src/obj/synproxy.c
@@ -117,12 +117,12 @@ static int nftnl_obj_synproxy_parse(struct nftnl_obj *e, struct nlattr *attr)
return 0;
}
-static int nftnl_obj_synproxy_snprintf(char *buf, size_t size,
+static int nftnl_obj_synproxy_snprintf(char *buf, size_t len,
uint32_t flags,
const struct nftnl_obj *e)
{
struct nftnl_obj_synproxy *synproxy = nftnl_obj_data(e);
- int ret, offset = 0, len = size;
+ int ret, offset = 0;
if (e->flags & (1 << NFTNL_OBJ_SYNPROXY_MSS) &&
e->flags & (1 << NFTNL_OBJ_SYNPROXY_WSCALE)) {