[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -fix json pack bugs
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -fix json pack bugs |
Date: |
Wed, 28 Jul 2021 10:10:02 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
The following commit(s) were added to refs/heads/master by this push:
new 391794a46 -fix json pack bugs
391794a46 is described below
commit 391794a460140192b3466765ebc63797cea44000
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Wed Jul 28 10:06:44 2021 +0200
-fix json pack bugs
---
src/json/json_pack.c | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/json/json_pack.c b/src/json/json_pack.c
index e104ad602..20db47cd4 100644
--- a/src/json/json_pack.c
+++ b/src/json/json_pack.c
@@ -232,13 +232,13 @@ GNUNET_JSON_pack_data_varsize (const char *name,
const void *blob,
size_t blob_size)
{
- json_t *json;
+ struct GNUNET_JSON_PackSpec ps = {
+ .field_name = name,
+ .object = GNUNET_JSON_from_data (blob,
+ blob_size)
+ };
- json = GNUNET_JSON_from_data (blob,
- blob_size);
- GNUNET_assert (NULL != json);
- return GNUNET_JSON_pack_object_steal (name,
- json);
+ return ps;
}
@@ -290,12 +290,12 @@ struct GNUNET_JSON_PackSpec
GNUNET_JSON_pack_rsa_public_key (const char *name,
const struct GNUNET_CRYPTO_RsaPublicKey *pk)
{
- json_t *json;
+ struct GNUNET_JSON_PackSpec ps = {
+ .field_name = name,
+ .object = GNUNET_JSON_from_rsa_public_key (pk)
+ };
- json = GNUNET_JSON_from_rsa_public_key (pk);
- GNUNET_assert (NULL != json);
- return GNUNET_JSON_pack_object_steal (name,
- json);
+ return ps;
}
@@ -303,12 +303,12 @@ struct GNUNET_JSON_PackSpec
GNUNET_JSON_pack_rsa_signature (const char *name,
const struct GNUNET_CRYPTO_RsaSignature *sig)
{
- json_t *json;
+ struct GNUNET_JSON_PackSpec ps = {
+ .field_name = name,
+ .object = GNUNET_JSON_from_rsa_signature (sig)
+ };
- json = GNUNET_JSON_from_rsa_signature (sig);
- GNUNET_assert (NULL != json);
- return GNUNET_JSON_pack_object_steal (name,
- json);
+ return ps;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -fix json pack bugs,
gnunet <=