[ntpsec-main commit] Revert incorrect booleanization. Glitch found by Coverity.

Eric S. Raymond esr at ntpsec.org
Sun Nov 8 15:09:06 UTC 2015


Module:    ntpsec-main
Branch:    master
Commit:    f2af6e9cbf08e0c95652eb933e3990fc10da9575
Changeset: http://git.ntpsec.org//commit/?id=f2af6e9cbf08e0c95652eb933e3990fc10da9575

Author:    Eric S. Raymond <esr at thyrsus.com>
Date:      Sun Nov  8 10:08:55 2015 -0500

Revert incorrect booleanization. Glitch found by Coverity.

---

 ntpd/ntp_proto.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ntpd/ntp_proto.c b/ntpd/ntp_proto.c
index f19e21b..ce40063 100644
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -145,7 +145,7 @@ static	void	clock_update	(struct peer *);
 static	void	measure_precision(const bool);
 static	double	measure_tick_fuzz(void);
 static	int	local_refid	(struct peer *);
-static	bool	peer_unfit	(struct peer *);
+static	int	peer_unfit	(struct peer *);
 #ifdef ENABLE_AUTOKEY
 static	bool	group_test	(char *, char *);
 #endif /* ENABLE_AUTOKEY */
@@ -3895,7 +3895,7 @@ local_refid(
  * > BOGON12 a direct or indirect synchronization loop would form
  * > BOGON13 unreachable or noselect
  */
-bool				/* false if fit, true if unfit */
+int				/* false if fit, true if unfit */
 peer_unfit(
 	struct peer *peer	/* peer structure pointer */
 	)



More information about the vc mailing list