From 4722cfeed34c2333989aa88d9e0b5e4ed89f3280 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Mon, 22 Feb 2021 15:44:35 +0100 Subject: table: rework flags printing Simplify routine to print the table flags. Add table_flag_name() and use it from json too. Signed-off-by: Pablo Neira Ayuso --- src/json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/json.c') diff --git a/src/json.c b/src/json.c index 0ccbbe8a..defbc8fb 100644 --- a/src/json.c +++ b/src/json.c @@ -444,7 +444,7 @@ static json_t *table_flags_json(const struct table *table) while (flags) { if (flags & 0x1) { - tmp = json_string(table_flags_name[i]); + tmp = json_string(table_flag_name(i)); json_array_append_new(root, tmp); } flags >>= 1; -- cgit v1.2.3