summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7e62a54)
raw | patch | inline | side by side (parent: 7e62a54)
author | Florian Forster <octo@collectd.org> | |
Sat, 6 Aug 2016 11:59:11 +0000 (13:59 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 6 Aug 2016 18:37:40 +0000 (20:37 +0200) |
src/utils_format_json_test.c | patch | blob | history |
index 353ef01c36f707e89e2436674201b71acae478f4..aa275fd208515c82ce42ab20a4ef1e16fc2df3f4 100644 (file)
#if HAVE_YAJL_YAJL_VERSION_H
# include <yajl/yajl_version.h>
#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)