diff options
Diffstat (limited to 'src/json/json_pack.c')
-rw-r--r-- | src/json/json_pack.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/json/json_pack.c b/src/json/json_pack.c index 836f03911..7a5d22ee2 100644 --- a/src/json/json_pack.c +++ b/src/json/json_pack.c | |||
@@ -88,12 +88,12 @@ struct GNUNET_JSON_PackSpec | |||
88 | TALER_JSON_pack_amount (const char *name, | 88 | TALER_JSON_pack_amount (const char *name, |
89 | const struct TALER_Amount *amount) | 89 | const struct TALER_Amount *amount) |
90 | { | 90 | { |
91 | json_t *json; | 91 | struct GNUNET_JSON_PackSpec ps = { |
92 | .field_name = name, | ||
93 | .object = TALER_JSON_from_amount (amount) | ||
94 | }; | ||
92 | 95 | ||
93 | json = TALER_JSON_from_amount (amount); | 96 | return ps; |
94 | GNUNET_assert (NULL != json); | ||
95 | return GNUNET_JSON_pack_object_steal (name, | ||
96 | json); | ||
97 | } | 97 | } |
98 | 98 | ||
99 | 99 | ||
@@ -101,12 +101,12 @@ struct GNUNET_JSON_PackSpec | |||
101 | TALER_JSON_pack_amount_nbo (const char *name, | 101 | TALER_JSON_pack_amount_nbo (const char *name, |
102 | const struct TALER_AmountNBO *amount) | 102 | const struct TALER_AmountNBO *amount) |
103 | { | 103 | { |
104 | json_t *json; | 104 | struct GNUNET_JSON_PackSpec ps = { |
105 | .field_name = name, | ||
106 | .object = TALER_JSON_from_amount_nbo (amount) | ||
107 | }; | ||
105 | 108 | ||
106 | json = TALER_JSON_from_amount_nbo (amount); | 109 | return ps; |
107 | GNUNET_assert (NULL != json); | ||
108 | return GNUNET_JSON_pack_object_steal (name, | ||
109 | json); | ||
110 | } | 110 | } |
111 | 111 | ||
112 | 112 | ||