[Git][NTPsec/ntpsec][master] Remove a macro that is now only used once.
Eric S. Raymond
gitlab at mg.gitlab.com
Tue Jul 5 11:09:48 UTC 2016
Eric S. Raymond pushed to branch master at NTPsec / ntpsec
Commits:
56471f9e by Eric S. Raymond at 2016-07-05T07:08:45-04:00
Remove a macro that is now only used once.
- - - - -
2 changed files:
- include/recvbuff.h
- ntpd/ntp_proto.c
Changes:
=====================================
include/recvbuff.h
=====================================
--- a/include/recvbuff.h
+++ b/include/recvbuff.h
@@ -79,14 +79,6 @@ struct recvbuf {
#endif /* REFCLOCK */
};
-/* true for network packets, false for refclock packets */
-#ifdef REFCLOCK
-#define is_refclock_packet(rbufp) (!(rbufp)->network_packet)
-#else
-#define is_refclock_packet(rbufp) false
-#endif /* REFCLOCK */
-
-
extern void init_recvbuff(int);
/* freerecvbuf - make a single recvbuf available for reuse
=====================================
ntpd/ntp_proto.c
=====================================
--- a/ntpd/ntp_proto.c
+++ b/ntpd/ntp_proto.c
@@ -421,7 +421,7 @@ receive(
return; /* bogus port */
}
#ifdef REFCLOCK
- if (is_refclock_packet(rbufp))
+ if (!rbufp->network_packet)
restrict_mask = 0;
else
#endif /* REFCLOCK */
@@ -991,8 +991,9 @@ receive(
* Mobilize a symmetric passive association.
*/
if ((peer = newpeer(&rbufp->recv_srcadr, NULL,
- rbufp->dstadr, MODE_PASSIVE, hisversion, pkt->ppoll,
- NTP_MAXDPOLL, 0, MDF_UCAST, 0, skeyid)) == NULL) {
+ rbufp->dstadr, MODE_PASSIVE, hisversion,
+ pkt->ppoll, NTP_MAXDPOLL, 0, MDF_UCAST,
+ 0, skeyid)) == NULL) {
sys_declined++;
return; /* ignore duplicate */
}
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/56471f9e2bf0626bae682bfb5f7cb88c195cfcda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20160705/217aa91b/attachment.html>
More information about the vc
mailing list