From f6978fcc04f84a461df627f450e398ec5ad163d8 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 11 Sep 2020 22:03:49 +0200 Subject: eval: eliminate use of ceil() Signed-off-by: Jo-Philipp Wich --- eval.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3