diff options
Diffstat (limited to 'src/obj/limit.c')
-rw-r--r-- | src/obj/limit.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/src/obj/limit.c b/src/obj/limit.c index 60b0159..8b40f9d 100644 --- a/src/obj/limit.c +++ b/src/obj/limit.c @@ -148,8 +148,9 @@ static int nftnl_obj_limit_parse(struct nftnl_obj *e, struct nlattr *attr) return 0; } -static int nftnl_obj_limit_snprintf_default(char *buf, size_t len, - const struct nftnl_obj *e) +static int nftnl_obj_limit_snprintf(char *buf, size_t len, + uint32_t flags, + const struct nftnl_obj *e) { struct nftnl_obj_limit *limit = nftnl_obj_data(e); @@ -158,24 +159,6 @@ static int nftnl_obj_limit_snprintf_default(char *buf, size_t len, limit->burst, limit->type, limit->flags); } -static int nftnl_obj_limit_snprintf(char *buf, size_t len, uint32_t type, - uint32_t flags, - const struct nftnl_obj *e) -{ - if (len) - buf[0] = '\0'; - - switch (type) { - case NFTNL_OUTPUT_DEFAULT: - return nftnl_obj_limit_snprintf_default(buf, len, e); - case NFTNL_OUTPUT_XML: - case NFTNL_OUTPUT_JSON: - default: - break; - } - return -1; -} - struct obj_ops obj_ops_limit = { .name = "limit", .type = NFT_OBJECT_LIMIT, |