[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: purge fields instead of setting
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: purge fields instead of setting to NULL as suggested by Florian |
Date: |
Tue, 15 Jun 2021 20:34:29 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 29184483 purge fields instead of setting to NULL as suggested by
Florian
29184483 is described below
commit 2918448338647659e899d485acc659ab095be51c
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Tue Jun 15 20:34:25 2021 +0200
purge fields instead of setting to NULL as suggested by Florian
---
src/json/json.c | 22 ++--------------------
src/json/test_json.c | 2 +-
2 files changed, 3 insertions(+), 21 deletions(-)
diff --git a/src/json/json.c b/src/json/json.c
index 2c3d4a2c..c480d1b2 100644
--- a/src/json/json.c
+++ b/src/json/json.c
@@ -206,16 +206,8 @@ forget (const json_t *in)
json_object_get (rx,
key)) )
{
- if (0 !=
- json_object_set_new (ret,
- key,
- json_null ()))
- {
- GNUNET_break (0);
- json_decref (ret);
- json_decref (rx);
- return NULL;
- }
+ (void) json_object_del (ret,
+ key);
continue; /* already forgotten earlier */
}
t = forget (value);
@@ -281,16 +273,6 @@ forget (const json_t *in)
json_decref (rx);
return NULL;
}
- if (0 !=
- json_object_set_new (ret,
- key,
- json_null ()))
- {
- GNUNET_break (0);
- json_decref (ret);
- json_decref (rx);
- return NULL;
- }
}
else
{
diff --git a/src/json/test_json.c b/src/json/test_json.c
index 21073d69..4267efe1 100644
--- a/src/json/test_json.c
+++ b/src/json/test_json.c
@@ -178,7 +178,7 @@ test_contract (void)
sizeof (h1));
if (0 !=
strcmp (s,
-
"287VXK8T6PXKD05W8Y94QJNEFCMRXBC9S7KNKTWGH2G2J2D7RYKPSHNH1HG9NT1K2HRHGC67W6QM6GEC4BSN1DPNEBCS0AVDT2DBP5G"))
+
"48YVST0SZJXWNG3KAD14SSK3AD0T5V01W5AE6E76DYKMJSC5BQ19M0FZ7CZP5JY26FC4AFXTXRGEVSQ1NSKPQ1DQ4GS9C4SAECG5RZ8"))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Invalid reference hash: %s\n",
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: purge fields instead of setting to NULL as suggested by Florian,
gnunet <=