purge fields instead of setting to NULL as suggested by Florian
This commit is contained in:
parent
fa330ca12a
commit
2918448338
@ -206,16 +206,8 @@ forget (const json_t *in)
|
|||||||
json_object_get (rx,
|
json_object_get (rx,
|
||||||
key)) )
|
key)) )
|
||||||
{
|
{
|
||||||
if (0 !=
|
(void) json_object_del (ret,
|
||||||
json_object_set_new (ret,
|
key);
|
||||||
key,
|
|
||||||
json_null ()))
|
|
||||||
{
|
|
||||||
GNUNET_break (0);
|
|
||||||
json_decref (ret);
|
|
||||||
json_decref (rx);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
continue; /* already forgotten earlier */
|
continue; /* already forgotten earlier */
|
||||||
}
|
}
|
||||||
t = forget (value);
|
t = forget (value);
|
||||||
@ -281,16 +273,6 @@ forget (const json_t *in)
|
|||||||
json_decref (rx);
|
json_decref (rx);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (0 !=
|
|
||||||
json_object_set_new (ret,
|
|
||||||
key,
|
|
||||||
json_null ()))
|
|
||||||
{
|
|
||||||
GNUNET_break (0);
|
|
||||||
json_decref (ret);
|
|
||||||
json_decref (rx);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -178,7 +178,7 @@ test_contract (void)
|
|||||||
sizeof (h1));
|
sizeof (h1));
|
||||||
if (0 !=
|
if (0 !=
|
||||||
strcmp (s,
|
strcmp (s,
|
||||||
"287VXK8T6PXKD05W8Y94QJNEFCMRXBC9S7KNKTWGH2G2J2D7RYKPSHNH1HG9NT1K2HRHGC67W6QM6GEC4BSN1DPNEBCS0AVDT2DBP5G"))
|
"48YVST0SZJXWNG3KAD14SSK3AD0T5V01W5AE6E76DYKMJSC5BQ19M0FZ7CZP5JY26FC4AFXTXRGEVSQ1NSKPQ1DQ4GS9C4SAECG5RZ8"))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
"Invalid reference hash: %s\n",
|
"Invalid reference hash: %s\n",
|
||||||
|
Loading…
Reference in New Issue
Block a user