summaryrefslogtreecommitdiffstats
path: root/src/obj/counter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/obj/counter.c')
-rw-r--r--src/obj/counter.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/obj/counter.c b/src/obj/counter.c
index 1baba4e..ef0cd20 100644
--- a/src/obj/counter.c
+++ b/src/obj/counter.c
@@ -109,8 +109,8 @@ nftnl_obj_counter_parse(struct nftnl_obj *e, struct nlattr *attr)
return 0;
}
-static int nftnl_obj_counter_snprintf_default(char *buf, size_t len,
- const struct nftnl_obj *e)
+static int nftnl_obj_counter_snprintf(char *buf, size_t len, uint32_t flags,
+ const struct nftnl_obj *e)
{
struct nftnl_obj_counter *ctr = nftnl_obj_data(e);
@@ -118,24 +118,6 @@ static int nftnl_obj_counter_snprintf_default(char *buf, size_t len,
ctr->pkts, ctr->bytes);
}
-static int nftnl_obj_counter_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_counter_snprintf_default(buf, len, e);
- case NFTNL_OUTPUT_XML:
- case NFTNL_OUTPUT_JSON:
- default:
- break;
- }
- return -1;
-}
-
struct obj_ops obj_ops_counter = {
.name = "counter",
.type = NFT_OBJECT_COUNTER,