* ntpd/ntp_util.c (stats_config):
* ntpd/ntp_loopfilter.c (loop_config):
* libntp/systime.c (adj_systime):
* include/ntp_proto.h (NTP_MAXFREQ):
Renamed MAX_FREQ to NTP_MAXFREQ
* ntpd/ntpd.c (ntpdmain):
* ntpd/ntp_proto.c (receive):
(poll_update):
* ntpd/ntp_intres.c (addentry):
* ntpd/ntp_config.c (getconfig):
Lint cleanup
From: Marc Brett <mbrett@rgs0.london.waii.com>
bk:
3922035c-CQcHpmcMXiYjQkRmCCceQ
2000-05-16 Harlan Stenn <stenn@whimsy.udel.edu>
+ * ntpd/ntp_util.c (stats_config):
+ * ntpd/ntp_loopfilter.c (loop_config):
+ * libntp/systime.c (adj_systime):
+ * include/ntp_proto.h (NTP_MAXFREQ):
+ Renamed MAX_FREQ to NTP_MAXFREQ
+
+ * ntpd/ntpd.c (ntpdmain):
+ * ntpd/ntp_proto.c (receive):
+ (poll_update):
+ * ntpd/ntp_intres.c (addentry):
+ * ntpd/ntp_config.c (getconfig):
+ Lint cleanup
+ From: Marc Brett <mbrett@rgs0.london.waii.com>
+
* include/ntp_stdlib.h:
* libntp/systime.c (adj_systime):
* ntpd/ntp_loopfilter.c (loop_config):
#include <config.h>
#endif
-#define MAX_FREQ 500e-6
+#define NTP_MAXFREQ 500e-6
#endif /* __ntp_proto_h */
}
} else
#endif
- if (dtemp > MAX_FREQ)
- dtemp = MAX_FREQ;
+ if (dtemp > NTP_MAXFREQ)
+ dtemp = NTP_MAXFREQ;
dtemp = dtemp * 1e6 + .5;
int ttl;
unsigned long ul;
keyid_t peerkey;
- char *peerkeystr;
- keyid_t lpeerkey;
+ u_char *peerkeystr;
+ keyid_t lpeerkey = 0;
int peerflags;
int hmode;
struct sockaddr_in peeraddr;
ce->ce_flags = (u_char)flags;
ce->ce_ttl = (u_char)ttl;
ce->ce_keyid = keyid;
- strncpy(ce->ce_keystr, keystr, MAXFILENAME);
+ strncpy((char *)ce->ce_keystr, keystr, MAXFILENAME);
ce->ce_next = NULL;
if (confentries == NULL) {
*/
etemp = clock_frequency + flladj + plladj;
drift_comp += etemp;
- if (drift_comp > MAX_FREQ)
- drift_comp = MAX_FREQ;
- else if (drift_comp <= -MAX_FREQ)
- drift_comp = -MAX_FREQ;
+ if (drift_comp > NTP_MAXFREQ)
+ drift_comp = NTP_MAXFREQ;
+ else if (drift_comp <= -NTP_MAXFREQ)
+ drift_comp = -NTP_MAXFREQ;
dtemp = SQUARE(clock_stability);
etemp = SQUARE(etemp) - dtemp;
clock_stability = SQRT(dtemp + etemp / CLOCK_AVG);
*/
rstclock(S_FSET);
drift_comp = freq;
- if (drift_comp > MAX_FREQ)
- drift_comp = MAX_FREQ;
- if (drift_comp < -MAX_FREQ)
- drift_comp = -MAX_FREQ;
+ if (drift_comp > NTP_MAXFREQ)
+ drift_comp = NTP_MAXFREQ;
+ if (drift_comp < -NTP_MAXFREQ)
+ drift_comp = -NTP_MAXFREQ;
#ifdef KERNEL_PLL
/*
* If the phase-lock code is implemented in the kernel,
int authlen; /* offset of MAC field */
int is_authentic; /* cryptosum ok */
int is_error; /* parse error */
- keyid_t pkeyid, skeyid, tkeyid; /* cryptographic keys */
+ keyid_t skeyid; /* cryptographic keys */
+#ifdef AUTOKEY
+ keyid_t pkeyid, tkeyid; /* cryptographic keys */
+#endif /* AUTOKEY */
struct peer *peer2;
int retcode = AM_NOMATCH;
* an extension field is present. If 2 or 4, the packet is a
* runt and thus discarded.
*/
- pkeyid = skeyid = tkeyid = 0;
+ skeyid = 0;
+#ifdef AUTOKEY
+ pkeyid = tkeyid = 0;
+#endif /* AUTOKEY */
authlen = LEN_PKT_NOMAC;
while ((has_mac = rbufp->recv_length - authlen) > 0) {
int temp;
int hpoll
)
{
+#ifdef AUTOKEY
long oldpoll;
+#endif /* AUTOKEY */
/*
* The wiggle-the-poll-interval dance. Broadcasters dance only
* clock. Broadcast clients are usually lead by their broadcast
* partner, but faster in the initial mating dance.
*/
+
+#ifdef AUTOKEY
oldpoll = peer->kpoll;
+#endif /* AUTOKEY */
+
if (peer->hmode == MODE_BROADCAST) {
peer->hpoll = peer->minpoll;
} else if (peer->flags & FLAG_SYSPEER) {
}
(void) fclose(fp);
if ( !finite(old_drift)
- || (fabs(old_drift) > (MAX_FREQ * 1e6))) {
+ || (fabs(old_drift) > (NTP_MAXFREQ * 1e6))) {
msyslog(LOG_ERR, "invalid frequency (%f) in %s",
old_drift, stats_drift_file);
exit(1);
{
l_fp now;
char *cp;
- u_int n;
#ifdef AUTOKEY
+ u_int n;
char hostname[MAXFILENAME];
#endif /* AUTOKEY */
struct recvbuf *rbuflist;