1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-08 08:58:27 +03:00

test-json: use fabs

This commit is contained in:
Thomas Hindoe Paaboel Andersen 2014-12-16 20:36:40 +01:00
parent b0ceb53a7d
commit 30c873fbfb

View File

@ -19,6 +19,8 @@
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
#include <math.h>
#include "log.h"
#include "util.h"
#include "json.h"
@ -52,7 +54,7 @@ static void test_one(const char *data, ...) {
double d;
d = va_arg(ap, double);
assert_se(abs(d - v.real) < 0.001);
assert_se(fabs(d - v.real) < 0.001);
} else if (t == JSON_INTEGER) {
intmax_t i;