summaryrefslogtreecommitdiffstats
path: root/src/datatype.c
diff options
context:
space:
mode:
authorElise Lennion <elise.lennion@gmail.com>2016-12-10 21:59:36 -0200
committerPablo Neira Ayuso <pablo@netfilter.org>2016-12-11 20:32:35 +0100
commitd03de764e498954a08251dee9e820347ad177970 (patch)
treed927f6e2a99b3c153ae9cdd9206170b7e0b26f74 /src/datatype.c
parentc89a0801d07740eff531412fe35ea2c9faad82b0 (diff)
datatype: Display pre-defined inet_service values in decimal base
because the convention is to represent ports in base 10. gcc-workaround is no longer needed and was removed. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/datatype.c')
-rw-r--r--src/datatype.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/datatype.c b/src/datatype.c
index 5600efcc..ec0b1201 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -204,8 +204,11 @@ void symbol_table_print(const struct symbol_table *tbl,
if (byteorder == BYTEORDER_BIG_ENDIAN)
switch_byteorder(&value, len);
- printf("\t%-30s\t0x%.*" PRIx64 "\n",
- s->identifier, 2 * len, value);
+ if (tbl->base == BASE_DECIMAL)
+ printf("\t%-30s\t%20lu\n", s->identifier, value);
+ else
+ printf("\t%-30s\t0x%.*" PRIx64 "\n",
+ s->identifier, 2 * len, value);
}
}