diff options
Diffstat (limited to 'src/json')
-rw-r--r-- | src/json/Makefile.am | 1 | ||||
-rw-r--r-- | src/json/json_gnsrecord.c | 4 | ||||
-rw-r--r-- | src/json/test_json_mhd.c | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/json/Makefile.am b/src/json/Makefile.am index 5968a3596..9cd80851c 100644 --- a/src/json/Makefile.am +++ b/src/json/Makefile.am | |||
@@ -37,6 +37,7 @@ TESTS = \ | |||
37 | 37 | ||
38 | test_json_SOURCES = \ | 38 | test_json_SOURCES = \ |
39 | test_json.c | 39 | test_json.c |
40 | test_json_CFLAGS = $(MHD_CFLAGS) $(AM_CFLAGS) | ||
40 | test_json_LDADD = \ | 41 | test_json_LDADD = \ |
41 | libgnunetjson.la \ | 42 | libgnunetjson.la \ |
42 | $(top_builddir)/src/util/libgnunetutil.la \ | 43 | $(top_builddir)/src/util/libgnunetutil.la \ |
diff --git a/src/json/json_gnsrecord.c b/src/json/json_gnsrecord.c index bfbdd96ee..37f0c03da 100644 --- a/src/json/json_gnsrecord.c +++ b/src/json/json_gnsrecord.c | |||
@@ -50,10 +50,10 @@ cleanup_recordinfo (struct GnsRecordInfo *gnsrecord_info) | |||
50 | { | 50 | { |
51 | if (NULL != *(gnsrecord_info->rd)) | 51 | if (NULL != *(gnsrecord_info->rd)) |
52 | { | 52 | { |
53 | for (int i = 0; i < *(gnsrecord_info->rd_count); i++) | 53 | for (unsigned int i = 0; i < *(gnsrecord_info->rd_count); i++) |
54 | { | 54 | { |
55 | if (NULL != (*(gnsrecord_info->rd))[i].data) | 55 | if (NULL != (*(gnsrecord_info->rd))[i].data) |
56 | GNUNET_free ((char *) (*(gnsrecord_info->rd))[i].data); | 56 | GNUNET_free_nz ((char *) (*(gnsrecord_info->rd))[i].data); |
57 | } | 57 | } |
58 | GNUNET_free (*(gnsrecord_info->rd)); | 58 | GNUNET_free (*(gnsrecord_info->rd)); |
59 | *(gnsrecord_info->rd) = NULL; | 59 | *(gnsrecord_info->rd) = NULL; |
diff --git a/src/json/test_json_mhd.c b/src/json/test_json_mhd.c index 5ab1b63ca..642715f25 100644 --- a/src/json/test_json_mhd.c +++ b/src/json/test_json_mhd.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include "gnunet_util_lib.h" | 27 | #include "gnunet_util_lib.h" |
28 | #include "gnunet_json_lib.h" | 28 | #include "gnunet_json_lib.h" |
29 | #include "gnunet_curl_lib.h" | 29 | #include "gnunet_curl_lib.h" |
30 | #include "gnunet_mhd_compat.h" | ||
30 | #include <zlib.h> | 31 | #include <zlib.h> |
31 | 32 | ||
32 | #define MAX_SIZE 1024 * 1024 | 33 | #define MAX_SIZE 1024 * 1024 |
@@ -36,7 +37,7 @@ static json_t *bigj; | |||
36 | static int global_ret; | 37 | static int global_ret; |
37 | 38 | ||
38 | 39 | ||
39 | static int | 40 | static MHD_RESULT |
40 | access_handler_cb (void *cls, | 41 | access_handler_cb (void *cls, |
41 | struct MHD_Connection *connection, | 42 | struct MHD_Connection *connection, |
42 | const char *url, | 43 | const char *url, |