aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-20 22:40:06 +0200
committerChristian Grothoff <christian@grothoff.org>2015-06-20 22:40:06 +0200
commit61752e033436d73c7a70bc12d5be4706f1595ab6 (patch)
tree459abddec65b460ce4b1473ed96d8a5df3d6ed21 /src/util
parente2d453f1d2c9db904f2d3dc3146c7fc3f2565bef (diff)
simplify /keys parser by using json parser interpreter
Diffstat (limited to 'src/util')
-rw-r--r--src/util/json.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/json.c b/src/util/json.c
index e35b88a8f..d72840ebe 100644
--- a/src/util/json.c
+++ b/src/util/json.c
@@ -92,8 +92,8 @@ TALER_json_from_abs (struct GNUNET_TIME_Absolute stamp)
if (stamp.abs_value_us == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us)
return json_string ("never");
ret = GNUNET_asprintf (&mystr,
- "%llu",
- (long long) (stamp.abs_value_us / (1000 * 1000)));
+ "/%llu/",
+ (long long) (stamp.abs_value_us / (1000LL * 1000LL)));
GNUNET_assert (ret > 0);
j = json_string (mystr);
GNUNET_free (mystr);
@@ -330,7 +330,7 @@ TALER_json_to_abs (json_t *json,
return GNUNET_OK;
}
EXITIF (1 > sscanf (str, "%llu", &abs_value_s));
- abs->abs_value_us = abs_value_s * 1000 * 1000;
+ abs->abs_value_us = abs_value_s * 1000LL * 1000LL;
return GNUNET_OK;
EXITIF_exit: