diff options
Diffstat (limited to 'src/flowtable.c')
-rw-r--r-- | src/flowtable.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/flowtable.c b/src/flowtable.c index d651066..e6c2475 100644 --- a/src/flowtable.c +++ b/src/flowtable.c @@ -630,18 +630,11 @@ static int nftnl_flowtable_cmd_snprintf(char *buf, size_t remain, { int ret, offset = 0; - switch (type) { - case NFTNL_OUTPUT_DEFAULT: - ret = nftnl_flowtable_snprintf_default(buf + offset, remain, c); - SNPRINTF_BUFFER_SIZE(ret, remain, offset); - break; - case NFTNL_OUTPUT_XML: - case NFTNL_OUTPUT_JSON: - break; - default: + if (type != NFTNL_OUTPUT_DEFAULT) return -1; - } + ret = nftnl_flowtable_snprintf_default(buf + offset, remain, c); + SNPRINTF_BUFFER_SIZE(ret, remain, offset); return offset; } |