aboutsummaryrefslogtreecommitdiff
path: root/src/rest
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2015-03-26 17:03:19 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2015-03-26 17:03:19 +0000
commit6953069393619f01de19bcfa2041ca0072fb9532 (patch)
treee5b9c15b111fe4fcd0db5005949e87be414b4f82 /src/rest
parent9cbff235e16bb2888aca2ba492f46bca9351142d (diff)
downloadgnunet-6953069393619f01de19bcfa2041ca0072fb9532.tar.gz
gnunet-6953069393619f01de19bcfa2041ca0072fb9532.zip
-fix
Diffstat (limited to 'src/rest')
-rw-r--r--src/rest/rest.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rest/rest.c b/src/rest/rest.c
index 225798db9..196fd4f88 100644
--- a/src/rest/rest.c
+++ b/src/rest/rest.c
@@ -347,7 +347,7 @@ GNUNET_REST_jsonapi_object_resource_add (struct JsonApiObject *resp,
347int 347int
348GNUNET_REST_jsonapi_object_resource_count (struct JsonApiObject *resp) 348GNUNET_REST_jsonapi_object_resource_count (struct JsonApiObject *resp)
349{ 349{
350 return resp->res_count++; 350 return resp->res_count;
351} 351}
352 352
353/** 353/**
@@ -412,7 +412,6 @@ GNUNET_REST_jsonapi_data_serialize (const struct JsonApiObject *resp,
412 return GNUNET_SYSERR; 412 return GNUNET_SYSERR;
413 413
414 root_json = json_object (); 414 root_json = json_object ();
415
416 if (1 == resp->res_count) 415 if (1 == resp->res_count)
417 { 416 {
418 json_object_set (root_json, GNUNET_REST_JSONAPI_KEY_DATA, resp->res_list_head->res_obj); 417 json_object_set (root_json, GNUNET_REST_JSONAPI_KEY_DATA, resp->res_list_head->res_obj);