times: Fix tests.
authorBruno Haible <bruno@clisp.org>
Tue, 11 Dec 2018 19:21:52 +0000 (20:21 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 11 Dec 2018 19:37:18 +0000 (20:37 +0100)
* tests/test-times.c (doublecmp): Implement a total order.

ChangeLog
tests/test-times.c

index 019b8252e10158d13048d93c359b5f94bb3722ec..82e3a499cc111547c8acdad3ab624e76f7aba6ff 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-11  Bruno Haible  <bruno@clisp.org>
+
+       times: Fix tests.
+       * tests/test-times.c (doublecmp): Implement a total order.
+
 2018-12-11  Bruno Haible  <bruno@clisp.org>
 
        array-set, linkedhash-set, hash-set: Fix tests.
index eb069e41ff80f2f7e3570578055c94d0fd3f5d89..7781e575d00fa461897ee9c1719054e05eccd04e 100644 (file)
@@ -35,7 +35,7 @@ doublecmp (const void *p, const void *q)
   double a = *(double *) p;
   double b = *(double *) q;
 
-  return a < b;
+  return a < b ? -1 : a > b ? 1 : 0;
 }
 
 int