From 155f43f78f59d3740baa47e451c427f7b274eb76 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 6 Aug 2016 13:59:11 +0200 Subject: [PATCH] src/utils_format_json_test.c: Fix @rubenk's review comments. --- src/utils_format_json_test.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/utils_format_json_test.c b/src/utils_format_json_test.c index 353ef01c..aa275fd2 100644 --- a/src/utils_format_json_test.c +++ b/src/utils_format_json_test.c @@ -34,25 +34,23 @@ #if HAVE_YAJL_YAJL_VERSION_H # include #endif -#if defined(YAJL_MAJOR) && (YAJL_MAJOR > 1) +#if YAJL_MAJOR > 1 # define HAVE_YAJL_V2 1 #endif -struct label_s +typedef struct { - char *key; - char *value; -}; -typedef struct label_s label_t; + char const *key; + char const *value; +} label_t; -struct test_case_s +typedef struct { label_t *expected_labels; size_t expected_labels_num; label_t *current_label; -}; -typedef struct test_case_s test_case_t; +} test_case_t; #if HAVE_YAJL_V2 static int test_map_key (void *ctx, unsigned char const *key, size_t key_len) -- 2.30.2