summaryrefslogtreecommitdiffstats
path: root/src/datatype.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datatype.c')
-rw-r--r--src/datatype.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/datatype.c b/src/datatype.c
index 519f79d7..6d6826e9 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -191,19 +191,10 @@ void symbolic_constant_print(const struct symbol_table *tbl,
break;
}
- if (s->identifier == NULL)
+ if (s->identifier == NULL || nft_output_numeric_symbol(octx))
return expr_basetype(expr)->print(expr, octx);
- if (quotes)
- nft_print(octx, "\"");
-
- if (nft_output_numeric_symbol(octx))
- nft_print(octx, "%" PRIu64 "", val);
- else
- nft_print(octx, "%s", s->identifier);
-
- if (quotes)
- nft_print(octx, "\"");
+ nft_print(octx, quotes ? "\"%s\"" : "%s", s->identifier);
}
static void switch_byteorder(void *data, unsigned int len)