[Git][NTPsec/ntpsec][master] Correct comments about the return value for ternary comparison macros

Eric S. Raymond gitlab at mg.gitlab.com
Sat Mar 11 13:50:44 UTC 2017


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


Commits:
90d39498 by Achim Gratz at 2017-03-11T08:50:30-05:00
Correct comments about the return value for ternary comparison macros

* include/timespecops.h: The sign of the return value is opposite from
  what the comment says it should be.  Fix the comment as the
  implementation has apparently never changed.

- - - - -


1 changed file:

- include/timespecops.h


Changes:

=====================================
include/timespecops.h
=====================================
--- a/include/timespecops.h
+++ b/include/timespecops.h
@@ -229,7 +229,7 @@ abs_tspec(
 
 /*
  * compare previously-normalised a and b
- * return 1 / 0 / -1 if a < / == / > b
+ * return -1 / 0 / 1 if a < / == / > b
  */
 
 static inline int
@@ -250,7 +250,7 @@ cmp_tspec(
 
 /*
  * compare possibly-denormal a and b
- * return 1 / 0 / -1 if a < / == / > b
+ * return -1 / 0 / 1 if a < / == / > b
  */
 static inline int
 cmp_tspec_denorm(
@@ -263,7 +263,7 @@ cmp_tspec_denorm(
 
 /*
  * test previously-normalised a
- * return 1 / 0 / -1 if a < / == / > 0
+ * return -1 / 0 / 1 if a < / == / > 0
  */
 static inline int
 test_tspec(
@@ -281,7 +281,7 @@ test_tspec(
 
 /*
  * test possibly-denormal a
- * return 1 / 0 / -1 if a < / == / > 0
+ * return -1 / 0 / 1 if a < / == / > 0
  */
 static inline int
 test_tspec_denorm(



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/90d39498f947156a0d99523daaff900d04070f73
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170311/1a35ff7e/attachment.html>


More information about the vc mailing list