[Git][NTPsec/ntpsec][master] Remove unused macro, fix embarassing syntax error in last commit.

Eric S. Raymond gitlab at mg.gitlab.com
Thu Jan 5 19:36:11 UTC 2017


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


Commits:
03c24457 by Eric S. Raymond at 2017-01-05T14:35:20-05:00
Remove unused macro, fix embarassing syntax error in last commit.

- - - - -


3 changed files:

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


Changes:

=====================================
include/ntp_fp.h
=====================================
--- a/include/ntp_fp.h
+++ b/include/ntp_fp.h
@@ -130,7 +130,6 @@ static inline l_fp ntohl_fp(l_fp_w lfpw) {
 #define	L_ISNEG(v)	M_ISNEG(lfpuint(v))
 #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))
 
 /*
  * s_fp/double and u_fp/double conversions


=====================================
ntpd/refclock_jupiter.c
=====================================
--- a/ntpd/refclock_jupiter.c
+++ b/ntpd/refclock_jupiter.c
@@ -819,7 +819,7 @@ jupiter_receive(struct recvbuf *rbufp)
 			 * (i.e. before limit, a.k.a. fudgetime2) in
 			 * the second.
 			 */
-			if (tstamp - pp->lastrec < instance->limit))
+			if (tstamp - pp->lastrec < instance->limit)
 				bumplfpuint(pp->lastrec, 1);
 
 			/* Parse timecode (even when there's no pps) */


=====================================
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_isgeq(const l_fp first, const l_fp second)
-{
-	return L_ISGEQ(first, second);
-}
-
 //----------------------------------------------------------------------
 // test data table for add/sub and compare
 //----------------------------------------------------------------------
@@ -291,16 +286,10 @@ TEST(lfpfunc, SignedRelOps) {
 		case 1:
 			TEST_ASSERT_TRUE (l_isgt(op1, op2));
 			TEST_ASSERT_FALSE(l_isgt(op2, op1));
-
-			TEST_ASSERT_TRUE (l_isgeq(op1, op2));
-			TEST_ASSERT_FALSE(l_isgeq(op2, op1));
 			break;
 		case 0:
 			TEST_ASSERT_FALSE(l_isgt(op1, op2));
 			TEST_ASSERT_FALSE(l_isgt(op2, op1));
-
-			TEST_ASSERT_TRUE (l_isgeq(op1, op2));
-			TEST_ASSERT_TRUE (l_isgeq(op2, op1));
 			break;
 		default:
 			TEST_FAIL_MESSAGE("unexpected UCMP result: ");



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


More information about the vc mailing list