diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2015-03-26 17:03:19 +0000 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2015-03-26 17:03:19 +0000 |
commit | 6953069393619f01de19bcfa2041ca0072fb9532 (patch) | |
tree | e5b9c15b111fe4fcd0db5005949e87be414b4f82 /src/rest/rest.c | |
parent | 9cbff235e16bb2888aca2ba492f46bca9351142d (diff) | |
download | gnunet-6953069393619f01de19bcfa2041ca0072fb9532.tar.gz gnunet-6953069393619f01de19bcfa2041ca0072fb9532.zip |
-fix
Diffstat (limited to 'src/rest/rest.c')
-rw-r--r-- | src/rest/rest.c | 3 |
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, | |||
347 | int | 347 | int |
348 | GNUNET_REST_jsonapi_object_resource_count (struct JsonApiObject *resp) | 348 | GNUNET_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); |