summaryrefslogtreecommitdiffstats
path: root/src/test/test-json.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2018-10-13 16:59:16 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2018-10-13 20:29:43 +0200
commit40990eac272b007c581932cfdd9bb43b7805a686 (patch)
tree116a481c0d060107e9063241e2eb6d2a297346ef /src/test/test-json.c
parentbusctl: drop unused variable (diff)
downloadsystemd-40990eac272b007c581932cfdd9bb43b7805a686.tar.xz
systemd-40990eac272b007c581932cfdd9bb43b7805a686.zip
test: use fabsl instead of fabs as json_variant_real() returns 'long double'
Diffstat (limited to '')
-rw-r--r--src/test/test-json.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-json.c b/src/test/test-json.c
index c1c2105913..e145559ae9 100644
--- a/src/test/test-json.c
+++ b/src/test/test-json.c
@@ -208,7 +208,7 @@ static void test_2(JsonVariant *v) {
/* has thisisaverylongproperty */
p = json_variant_by_key(v, "thisisaverylongproperty");
- assert_se(p && json_variant_type(p) == JSON_VARIANT_REAL && fabs(json_variant_real(p) - 1.27) < 0.001);
+ assert_se(p && json_variant_type(p) == JSON_VARIANT_REAL && fabsl(json_variant_real(p) - 1.27) < 0.001);
}