[Git][NTPsec/ntpsec][master] Another attempt at Coverity 356204
Hal Murray (@hal.murray)
gitlab at mg.gitlab.com
Tue Dec 5 09:29:14 UTC 2023
Hal Murray pushed to branch master at NTPsec / ntpsec
Commits:
ba259009 by Hal Murray at 2023-12-05T01:28:35-08:00
Another attempt at Coverity 356204
- - - - -
1 changed file:
- ntpd/ntp_filegen.c
Changes:
=====================================
ntpd/ntp_filegen.c
=====================================
@@ -342,11 +342,13 @@ filegen_setup(
break;
case FILEGEN_PID:
- current = ((int)gen->id_lo == getpid());
+ current = false;
break;
case FILEGEN_AGE:
- current = true;
+ /* current_time doesn't go backwards
+ * so don't need to check id_lo */
+ current = (gen->id_hi > current_time);
break;
case FILEGEN_DAY:
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/ba25900934da7430e4501f2d5895d72e734fad1b
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/-/commit/ba25900934da7430e4501f2d5895d72e734fad1b
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/20231205/8f1c6937/attachment.htm>
More information about the vc
mailing list