[Git][NTPsec/ntpsec][master] Another Coverity try

Hal Murray (@hal.murray) gitlab at mg.gitlab.com
Fri Jan 24 01:30:10 UTC 2025



Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
201618fc by Hal Murray at 2025-01-23T17:29:07-08:00
Another Coverity try

- - - - -


1 changed file:

- ntpd/ntp_refclock.c


Changes:

=====================================
ntpd/ntp_refclock.c
=====================================
@@ -469,7 +469,7 @@ refclock_sample(
 	 * approximately 60 percent of the samples remain.
 	 */
 	i = 0; j = n;
-	m = n - ((n*4)/10);
+	m = n*6/10;
 	/* CID 497295, Bug in Coverity: goes around loop when it shouldn't */
 	/* coverity[INTEGER_OVERFLOW] */
 	while ((j - i) > m) {



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/201618fce8e3ec7be2cc76a436551a580d655f28

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/201618fce8e3ec7be2cc76a436551a580d655f28
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20250124/8767370f/attachment.htm>


More information about the vc mailing list