[Git][NTPsec/ntpsec][master] Remove another unused macro and its test code.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Jan 5 17:35:17 UTC 2017


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


Commits:
b6acc298 by Eric S. Raymond at 2017-01-05T12:34:42-05:00
Remove another unused macro and its test code.

- - - - -


2 changed files:

- include/ntp_fp.h
- tests/libntp/lfpfunc.c


Changes:

=====================================
include/ntp_fp.h
=====================================
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -91,6 +91,10 @@ typedef struct {
          uint32_t        l_uf;
 } l_fp_w;
 
+/*
+ * Generate the wire-format version (that is, big-endian all the way down)
+ * of a timestamp expressed as a 64-bit scalar.
+ */
 static inline l_fp_w htonl_fp(l_fp lfp) {
     l_fp_w lfpw;
     lfpw.l_ui = htonl(lfpuint(lfp));
@@ -133,7 +137,6 @@ static inline l_fp ntohl_fp(l_fp_w lfpw) {
 #define	L_ISGT(a, b)	((int64_t)(*a) > (int64_t)(*b))
 #define	L_ISGTU(a, b)	((*a) > (*b))
 #define	L_ISGEQ(a, b)	((int64_t)(*a) >= (int64_t)(*b))
-#define L_ISGEQU(a, b)  ((*a) >= (*b))
 
 /*
  * s_fp/double and u_fp/double conversions


=====================================
tests/libntp/lfpfunc.c
=====================================
--- a/tests/libntp/lfpfunc.c
+++ b/tests/libntp/lfpfunc.c
@@ -118,11 +118,6 @@ static bool l_isgtu(const l_fp first, const l_fp second)
 	return L_ISGTU(&first, &second);
 }
 
-static bool l_isgequ(const l_fp first, const l_fp second)
-{
-	return L_ISGEQU(&first, &second);
-}
-
 static bool l_isgeq(const l_fp first, const l_fp second)
 {
 	return L_ISGEQ(&first, &second);
@@ -332,16 +327,10 @@ TEST(lfpfunc, UnsignedRelOps) {
 		case 1:
 			TEST_ASSERT_TRUE (l_isgtu(op1, op2));
 			TEST_ASSERT_FALSE(l_isgtu(op2, op1));
-
-			TEST_ASSERT_TRUE (l_isgequ(op1, op2));
-			TEST_ASSERT_FALSE(l_isgequ(op2, op1));
 			break;
 		case 0:
 			TEST_ASSERT_FALSE(l_isgtu(op1, op2));
 			TEST_ASSERT_FALSE(l_isgtu(op2, op1));
-
-			TEST_ASSERT_TRUE (l_isgequ(op1, op2));
-			TEST_ASSERT_TRUE (l_isgequ(op2, op1));
 			break;
 		default:
 			TEST_FAIL_MESSAGE("unexpected UCMP result: ");



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


More information about the vc mailing list