diff options
author | Phil Sutter <phil@nwl.cc> | 2021-03-09 12:01:19 +0100 |
---|---|---|
committer | Phil Sutter <phil@nwl.cc> | 2021-03-15 12:23:17 +0100 |
commit | 4f6e671b462180ba9af12bd30211811b5fca8cb1 (patch) | |
tree | 7ecc8024dc399b138757c7903686ec6ca5ff45bb /src/obj/synproxy.c | |
parent | 483050de7ceb60515541a7e83d07b8fdb7a2faf5 (diff) |
obj: Drop type parameter from snprintf callback
Objects don't support any other output type than NFTNL_OUTPUT_DEFAULT,
so just drop the parameter.
Signed-off-by: Phil Sutter <phil@nwl.cc>
Diffstat (limited to 'src/obj/synproxy.c')
-rw-r--r-- | src/obj/synproxy.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/obj/synproxy.c b/src/obj/synproxy.c index 56ebc85..e3a991b 100644 --- a/src/obj/synproxy.c +++ b/src/obj/synproxy.c @@ -117,8 +117,9 @@ static int nftnl_obj_synproxy_parse(struct nftnl_obj *e, struct nlattr *attr) return 0; } -static int nftnl_obj_synproxy_snprintf_default(char *buf, size_t size, - const struct nftnl_obj *e) +static int nftnl_obj_synproxy_snprintf(char *buf, size_t size, + uint32_t flags, + const struct nftnl_obj *e) { struct nftnl_obj_synproxy *synproxy = nftnl_obj_data(e); int ret, offset = 0, len = size; @@ -133,21 +134,6 @@ static int nftnl_obj_synproxy_snprintf_default(char *buf, size_t size, return offset; } -static int nftnl_obj_synproxy_snprintf(char *buf, size_t len, uint32_t type, - uint32_t flags, - const struct nftnl_obj *e) -{ - switch (type) { - case NFTNL_OUTPUT_DEFAULT: - return nftnl_obj_synproxy_snprintf_default(buf, len, e); - case NFTNL_OUTPUT_XML: - case NFTNL_OUTPUT_JSON: - default: - break; - } - return -1; -} - struct obj_ops obj_ops_synproxy = { .name = "synproxy", .type = NFT_OBJECT_SYNPROXY, |