[Git][NTPsec/ntpsec][lencode] ntpd/refclock_arbiter.c, etc: Actually test the files this time.

Gary E. Miller (@garyedmundsmiller) gitlab at mg.gitlab.com
Wed Aug 5 02:55:28 UTC 2026



Gary E. Miller pushed to branch lencode at NTPsec / ntpsec


Commits:
65e028d7 by Gary E. Miller at 2026-08-04T19:54:05-07:00
ntpd/refclock_arbiter.c, etc:  Actually test the files this time.

Fix nits.

- - - - -


3 changed files:

- ntpd/refclock_arbiter.c
- ntpd/refclock_jjy.c
- ntpd/refclock_zyfer.c


Changes:

=====================================
ntpd/refclock_arbiter.c
=====================================
@@ -439,7 +439,7 @@ arb_poll(
 	}
 	refclock_receive(peer);
 	record_clock_stats(peer, pp->a_lastcode);
-	DPRINT(1, ("arbiter: timecode %d %s\n",
+	DPRINT(1, ("arbiter: timecode %u %s\n",
 		   pp->lencode, pp->a_lastcode));
 }
 


=====================================
ntpd/refclock_jjy.c
=====================================
@@ -539,8 +539,9 @@ jjy_receive ( struct recvbuf *rbufp )
 
 	l_fp	tRecvTimestamp;		/* arrival timestamp */
 	int 	rc ;
-	char	*pBuf, sLogText [ MAX_LOGTEXT ] ;
-	int 	i, j, iReadRawBuf, iBreakPosition ;
+	char	*pBuf, sLogText [ MAX_LOGTEXT ];
+        unsigned i;
+	int 	j, iReadRawBuf, iBreakPosition;
 
 	/*
 	 * Initialize pointers and read the timecode and timestamp
@@ -648,7 +649,8 @@ jjy_receive ( struct recvbuf *rbufp )
 
 			/* Copy characters from temporary buffer to process buffer */
 			up->iLineBufLen = up->iTextBufLen = 0 ;
-			for ( i = iReadRawBuf ; i <= iBreakPosition ; i ++ ) {
+			for (i = iReadRawBuf ; (int)i <= iBreakPosition ;
+                             i ++ ) {
 
 				/* Copy all characters */
 				up->sLineBuf[up->iLineBufLen] = up->sRawBuf[i] ;


=====================================
ntpd/refclock_zyfer.c
=====================================
@@ -205,16 +205,15 @@ zyfer_receive(
 
 	if (!pp->lencode) {
 		if (*p == '!') {
-                    pp->lencode = (uncigned)refclock_gtlin(rbufp,
+                    pp->lencode = (unsigned)refclock_gtlin(rbufp,
                                        pp->a_lastcode,
-                                       sizeof(pp->a_lastcode,),
+                                       sizeof(pp->a_lastcode),
                                        &pp->lastrec);
                 } else {
 			return;
                 }
 	} else {
-                if (pp->lencode < 0 ||
-                    pp->lencode >= sizeof(pp->a_lastcode) - 1) {
+                if (pp->lencode >= sizeof(pp->a_lastcode) - 1) {
                     pp->lencode = 0;
                     pp->a_lastcode[0] = '\0';
                     refclock_report(peer, CEVNT_BADREPLY);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/65e028d7263ac579de5dc8157969a966e707f726

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/65e028d7263ac579de5dc8157969a966e707f726
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20260805/1455952b/attachment-0001.htm>


More information about the vc mailing list