diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-06-04 01:31:43 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-06-04 01:31:47 +0200 |
commit | a82c7af104e186fb92c15b709fb3ed838e871410 (patch) | |
tree | 08a80f00f48d74861c32154beb273c13570f668c | |
parent | 3f175b372d2fd8e5cedb2543d06a126ee9650dca (diff) | |
download | gnunet-a82c7af104e186fb92c15b709fb3ed838e871410.tar.gz gnunet-a82c7af104e186fb92c15b709fb3ed838e871410.zip |
allow NULL for object/arrayv0.19.5-talerdev.1
-rw-r--r-- | src/json/json_helper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/json/json_helper.c b/src/json/json_helper.c index 61257e62a..515cc4c7f 100644 --- a/src/json/json_helper.c +++ b/src/json/json_helper.c | |||
@@ -368,6 +368,8 @@ parse_object_const (void *cls, | |||
368 | json_t *root, | 368 | json_t *root, |
369 | struct GNUNET_JSON_Specification *spec) | 369 | struct GNUNET_JSON_Specification *spec) |
370 | { | 370 | { |
371 | if (NULL == root) | ||
372 | return GNUNET_OK; | ||
371 | if (! json_is_object (root)) | 373 | if (! json_is_object (root)) |
372 | { | 374 | { |
373 | GNUNET_break_op (0); | 375 | GNUNET_break_op (0); |
@@ -409,6 +411,8 @@ parse_array_const (void *cls, | |||
409 | json_t *root, | 411 | json_t *root, |
410 | struct GNUNET_JSON_Specification *spec) | 412 | struct GNUNET_JSON_Specification *spec) |
411 | { | 413 | { |
414 | if (NULL == root) | ||
415 | return GNUNET_OK; | ||
412 | if (! json_is_array (root)) | 416 | if (! json_is_array (root)) |
413 | { | 417 | { |
414 | GNUNET_break_op (0); | 418 | GNUNET_break_op (0); |