summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/expr/bitwise.c3
-rw-r--r--src/expr/byteorder.c3
-rw-r--r--src/expr/cmp.c3
-rw-r--r--src/expr/counter.c3
-rw-r--r--src/expr/ct.c3
-rw-r--r--src/expr/dup.c3
-rw-r--r--src/expr/dynset.c3
-rw-r--r--src/expr/exthdr.c3
-rw-r--r--src/expr/fib.c3
-rw-r--r--src/expr/fwd.c3
-rw-r--r--src/expr/hash.c3
-rw-r--r--src/expr/immediate.c3
-rw-r--r--src/expr/limit.c3
-rw-r--r--src/expr/log.c3
-rw-r--r--src/expr/lookup.c3
-rw-r--r--src/expr/masq.c3
-rw-r--r--src/expr/match.c3
-rw-r--r--src/expr/meta.c3
-rw-r--r--src/expr/nat.c3
-rw-r--r--src/expr/numgen.c3
-rw-r--r--src/expr/objref.c3
-rw-r--r--src/expr/payload.c3
-rw-r--r--src/expr/queue.c3
-rw-r--r--src/expr/quota.c3
-rw-r--r--src/expr/range.c3
-rw-r--r--src/expr/redir.c3
-rw-r--r--src/expr/reject.c3
-rw-r--r--src/expr/rt.c3
-rw-r--r--src/expr/target.c3
29 files changed, 0 insertions, 87 deletions
diff --git a/src/expr/bitwise.c b/src/expr/bitwise.c
index ff9ade4..a89734b 100644
--- a/src/expr/bitwise.c
+++ b/src/expr/bitwise.c
@@ -257,9 +257,6 @@ static int
nftnl_expr_bitwise_snprintf(char *buf, size_t size, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (size)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_bitwise_snprintf_default(buf, size, e);
diff --git a/src/expr/byteorder.c b/src/expr/byteorder.c
index 4bb95b4..47c04cf 100644
--- a/src/expr/byteorder.c
+++ b/src/expr/byteorder.c
@@ -272,9 +272,6 @@ static int
nftnl_expr_byteorder_snprintf(char *buf, size_t size, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (size)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_byteorder_snprintf_default(buf, size, e);
diff --git a/src/expr/cmp.c b/src/expr/cmp.c
index 7bafaec..b26d0eb 100644
--- a/src/expr/cmp.c
+++ b/src/expr/cmp.c
@@ -246,9 +246,6 @@ static int
nftnl_expr_cmp_snprintf(char *buf, size_t size, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (size)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_cmp_snprintf_default(buf, size, e);
diff --git a/src/expr/counter.c b/src/expr/counter.c
index 5c196d4..21901e8 100644
--- a/src/expr/counter.c
+++ b/src/expr/counter.c
@@ -164,9 +164,6 @@ static int nftnl_expr_counter_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags,
const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_counter_snprintf_default(buf, len, e);
diff --git a/src/expr/ct.c b/src/expr/ct.c
index 021a277..6f87a72 100644
--- a/src/expr/ct.c
+++ b/src/expr/ct.c
@@ -317,9 +317,6 @@ static int
nftnl_expr_ct_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_ct_snprintf_default(buf, len, e);
diff --git a/src/expr/dup.c b/src/expr/dup.c
index e2171f4..ed8e620 100644
--- a/src/expr/dup.c
+++ b/src/expr/dup.c
@@ -170,9 +170,6 @@ static int nftnl_expr_dup_snprintf_default(char *buf, size_t len,
static int nftnl_expr_dup_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_dup_snprintf_default(buf, len, e, flags);
diff --git a/src/expr/dynset.c b/src/expr/dynset.c
index 2755d49..160d0e1 100644
--- a/src/expr/dynset.c
+++ b/src/expr/dynset.c
@@ -314,9 +314,6 @@ static int
nftnl_expr_dynset_snprintf(char *buf, size_t size, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (size)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_dynset_snprintf_default(buf, size, e);
diff --git a/src/expr/exthdr.c b/src/expr/exthdr.c
index 11766fa..75cafbc 100644
--- a/src/expr/exthdr.c
+++ b/src/expr/exthdr.c
@@ -339,9 +339,6 @@ static int
nftnl_expr_exthdr_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_exthdr_snprintf_default(buf, len, e);
diff --git a/src/expr/fib.c b/src/expr/fib.c
index cbadeef..b922b26 100644
--- a/src/expr/fib.c
+++ b/src/expr/fib.c
@@ -236,9 +236,6 @@ static int
nftnl_expr_fib_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_fib_snprintf_default(buf, len, e);
diff --git a/src/expr/fwd.c b/src/expr/fwd.c
index 38923df..1312ea1 100644
--- a/src/expr/fwd.c
+++ b/src/expr/fwd.c
@@ -147,9 +147,6 @@ static int nftnl_expr_fwd_snprintf_default(char *buf, size_t len,
static int nftnl_expr_fwd_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_fwd_snprintf_default(buf, len, e, flags);
diff --git a/src/expr/hash.c b/src/expr/hash.c
index 066c790..fcc4fa5 100644
--- a/src/expr/hash.c
+++ b/src/expr/hash.c
@@ -288,9 +288,6 @@ static int
nftnl_expr_hash_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_hash_snprintf_default(buf, len, e);
diff --git a/src/expr/immediate.c b/src/expr/immediate.c
index aba84ea..b0570bd 100644
--- a/src/expr/immediate.c
+++ b/src/expr/immediate.c
@@ -262,9 +262,6 @@ static int
nftnl_expr_immediate_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch(type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_immediate_snprintf_default(buf, len, e, flags);
diff --git a/src/expr/limit.c b/src/expr/limit.c
index 8e1f02a..856ab18 100644
--- a/src/expr/limit.c
+++ b/src/expr/limit.c
@@ -243,9 +243,6 @@ static int
nftnl_expr_limit_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch(type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_limit_snprintf_default(buf, len, e);
diff --git a/src/expr/log.c b/src/expr/log.c
index 161327b..86d9651 100644
--- a/src/expr/log.c
+++ b/src/expr/log.c
@@ -301,9 +301,6 @@ static int
nftnl_expr_log_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch(type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_log_snprintf_default(buf, len, e);
diff --git a/src/expr/lookup.c b/src/expr/lookup.c
index 32220a3..5fcb81f 100644
--- a/src/expr/lookup.c
+++ b/src/expr/lookup.c
@@ -242,9 +242,6 @@ static int
nftnl_expr_lookup_snprintf(char *buf, size_t size, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (size)
- buf[0] = '\0';
-
switch(type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_lookup_snprintf_default(buf, size, e);
diff --git a/src/expr/masq.c b/src/expr/masq.c
index 1c75ee9..7c235d3 100644
--- a/src/expr/masq.c
+++ b/src/expr/masq.c
@@ -190,9 +190,6 @@ static int nftnl_expr_masq_snprintf_default(char *buf, size_t len,
static int nftnl_expr_masq_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_masq_snprintf_default(buf, len, e);
diff --git a/src/expr/match.c b/src/expr/match.c
index af659b3..dd09e1e 100644
--- a/src/expr/match.c
+++ b/src/expr/match.c
@@ -200,9 +200,6 @@ nftnl_expr_match_snprintf(char *buf, size_t len, uint32_t type,
{
struct nftnl_expr_match *match = nftnl_expr_data(e);
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return snprintf(buf, len, "name %s rev %u ",
diff --git a/src/expr/meta.c b/src/expr/meta.c
index b5c27e6..2c75841 100644
--- a/src/expr/meta.c
+++ b/src/expr/meta.c
@@ -252,9 +252,6 @@ static int
nftnl_expr_meta_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_meta_snprintf_default(buf, len, e);
diff --git a/src/expr/nat.c b/src/expr/nat.c
index 350633f..9271303 100644
--- a/src/expr/nat.c
+++ b/src/expr/nat.c
@@ -339,9 +339,6 @@ static int
nftnl_expr_nat_snprintf(char *buf, size_t size, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (size)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_nat_snprintf_default(buf, size, e);
diff --git a/src/expr/numgen.c b/src/expr/numgen.c
index 9b5b1b7..1369b01 100644
--- a/src/expr/numgen.c
+++ b/src/expr/numgen.c
@@ -224,9 +224,6 @@ static int
nftnl_expr_ng_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_ng_snprintf_default(buf, len, e);
diff --git a/src/expr/objref.c b/src/expr/objref.c
index b4b3383..4cfa3cb 100644
--- a/src/expr/objref.c
+++ b/src/expr/objref.c
@@ -236,9 +236,6 @@ static int nftnl_expr_objref_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags,
const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_objref_snprintf_default(buf, len, e);
diff --git a/src/expr/payload.c b/src/expr/payload.c
index 897fc77..91e1587 100644
--- a/src/expr/payload.c
+++ b/src/expr/payload.c
@@ -290,9 +290,6 @@ nftnl_expr_payload_snprintf(char *buf, size_t len, uint32_t type,
{
struct nftnl_expr_payload *payload = nftnl_expr_data(e);
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
if (payload->sreg)
diff --git a/src/expr/queue.c b/src/expr/queue.c
index e0fb785..a392a27 100644
--- a/src/expr/queue.c
+++ b/src/expr/queue.c
@@ -235,9 +235,6 @@ static int
nftnl_expr_queue_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_queue_snprintf_default(buf, len, e);
diff --git a/src/expr/quota.c b/src/expr/quota.c
index c247b0a..667e6e1 100644
--- a/src/expr/quota.c
+++ b/src/expr/quota.c
@@ -183,9 +183,6 @@ static int nftnl_expr_quota_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags,
const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_quota_snprintf_default(buf, len, e);
diff --git a/src/expr/range.c b/src/expr/range.c
index c7bb7c7..b2789ff 100644
--- a/src/expr/range.c
+++ b/src/expr/range.c
@@ -263,9 +263,6 @@ static int nftnl_expr_range_snprintf_default(char *buf, size_t size,
static int nftnl_expr_range_snprintf(char *buf, size_t size, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (size)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_range_snprintf_default(buf, size, e);
diff --git a/src/expr/redir.c b/src/expr/redir.c
index 9fb634a..b2aa345 100644
--- a/src/expr/redir.c
+++ b/src/expr/redir.c
@@ -204,9 +204,6 @@ static int
nftnl_expr_redir_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_redir_snprintf_default(buf, len, e);
diff --git a/src/expr/reject.c b/src/expr/reject.c
index 1e6fdf5..11d8b20 100644
--- a/src/expr/reject.c
+++ b/src/expr/reject.c
@@ -164,9 +164,6 @@ static int
nftnl_expr_reject_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_reject_snprintf_default(buf, len, e);
diff --git a/src/expr/rt.c b/src/expr/rt.c
index 10cb1e2..62c01a0 100644
--- a/src/expr/rt.c
+++ b/src/expr/rt.c
@@ -203,9 +203,6 @@ static int
nftnl_expr_rt_snprintf(char *buf, size_t len, uint32_t type,
uint32_t flags, const struct nftnl_expr *e)
{
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return nftnl_expr_rt_snprintf_default(buf, len, e);
diff --git a/src/expr/target.c b/src/expr/target.c
index 3c58b03..ed4bf7d 100644
--- a/src/expr/target.c
+++ b/src/expr/target.c
@@ -200,9 +200,6 @@ nftnl_expr_target_snprintf(char *buf, size_t len, uint32_t type,
{
struct nftnl_expr_target *target = nftnl_expr_data(e);
- if (len)
- buf[0] = '\0';
-
switch (type) {
case NFTNL_OUTPUT_DEFAULT:
return snprintf(buf, len, "name %s rev %u ",