[Git][NTPsec/ntpsec][master] Use fabs() instead of abs() for floating point values.

Eric S. Raymond gitlab at mg.gitlab.com
Sat Jan 23 18:45:07 UTC 2016


Eric S. Raymond pushed to branch master at NTPsec / ntpsec


Commits:
1072e976 by Matt Selsky at 2016-01-23T13:44:50-05:00
Use fabs() instead of abs() for floating point values.

- - - - -


1 changed file:

- tests/ntpdig/packet_handling.c


Changes:

=====================================
tests/ntpdig/packet_handling.c
=====================================
--- a/tests/ntpdig/packet_handling.c
+++ b/tests/ntpdig/packet_handling.c
@@ -14,7 +14,7 @@
 
 #define EXPECT_DOUBLE_EQ(a, b) { \
 	static const double epsilon = 1e-10; \
-	TEST_ASSERT_TRUE(abs(a - b) < epsilon); \
+	TEST_ASSERT_TRUE(fabs(a - b) < epsilon); \
 }
 
 static bool LfpEquality(const l_fp* expected, const l_fp* actual) {



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/1072e976a964101b7e7ffb41c461a9d0c2a60f21
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160123/fd0cbc43/attachment.html>


More information about the vc mailing list