summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-09-11 22:03:49 +0200
committerJo-Philipp Wich <jo@mein.io>2020-09-11 22:11:32 +0200
commitf6978fcc04f84a461df627f450e398ec5ad163d8 (patch)
treebb937fc3ec9662393cdfeb1b7c88a3799a14ed37
parent753d0585da7f899cfd954a2ea439d2df8521d37e (diff)
eval: eliminate use of ceil()
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 5bf44ef..68b2780 100644
--- a/eval.c
+++ b/eval.c
@@ -378,7 +378,7 @@ ut_getval(struct json_object *scope, struct json_object *key)
if (json_object_is_type(key, json_type_double)) {
d = json_object_get_double(key);
- if (ceil(d) != d)
+ if ((double)(int64_t)(d) != d)
return NULL;
idx = (int64_t)d;