]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Many files:
authorHarlan Stenn <stenn@ntp.org>
Wed, 17 May 2000 02:26:36 +0000 (02:26 -0000)
committerHarlan Stenn <stenn@ntp.org>
Wed, 17 May 2000 02:26:36 +0000 (02:26 -0000)
  * 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

ChangeLog
include/ntp_proto.h
libntp/systime.c
ntpd/ntp_config.c
ntpd/ntp_intres.c
ntpd/ntp_loopfilter.c
ntpd/ntp_proto.c
ntpd/ntp_util.c
ntpd/ntpd.c

index a88e215a23fb83359d4f8264202bd8ad07e09bd4..6ac8f519d2e833d2feb2ca4d7bd4afd57c2633a5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,19 @@
 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): 
index 0ea7a9b436583ce2f69ebbdd890a57da5278cf0b..e6e78553305be423aa711ceec0f30a1fe5fd9971 100644 (file)
@@ -5,6 +5,6 @@
 #include <config.h>
 #endif
 
-#define MAX_FREQ       500e-6
+#define NTP_MAXFREQ    500e-6
  
 #endif /* __ntp_proto_h */
index f9f9f8806715ff48b12ccb8c9684130645bda7d9..edaac1e33954d34218f43fbbcff0e831720d715d 100644 (file)
@@ -138,8 +138,8 @@ adj_systime(
                }
        } else 
 #endif
-               if (dtemp > MAX_FREQ)
-                       dtemp = MAX_FREQ;
+               if (dtemp > NTP_MAXFREQ)
+                       dtemp = NTP_MAXFREQ;
 
        dtemp = dtemp * 1e6 + .5;
 
index 263629819c4b38c72e6c55f606da620036433ad9..9d2bba364c55c6670074ce52ea971a14d0364ae4 100644 (file)
@@ -708,8 +708,8 @@ getconfig(
        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;
index 85676b1a72c31db801c713e7f5848343678b71c2..ad333fa5e785dbbe79814c9ddba917b537aa6690 100644 (file)
@@ -418,7 +418,7 @@ addentry(
        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) {
index d92158745b3fbeebb6f83bb49d8aa2dae5a1c871..f2c8d625d44403918f4f02dd13a1bc3e259b9b66 100644 (file)
@@ -537,10 +537,10 @@ local_clock(
         */
        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);
@@ -743,10 +743,10 @@ loop_config(
                 */
                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,
index c44a10805ce597460049454866a39bd5d42b2888..26c0db46f28fa1e3901d021d2d703da7e710a2be 100644 (file)
@@ -230,7 +230,10 @@ receive(
        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;
 
@@ -323,7 +326,10 @@ receive(
         * 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;
@@ -1040,7 +1046,9 @@ poll_update(
        int hpoll
        )
 {
+#ifdef AUTOKEY
        long oldpoll;
+#endif /* AUTOKEY */
 
        /*
         * The wiggle-the-poll-interval dance. Broadcasters dance only
@@ -1049,7 +1057,11 @@ poll_update(
         * 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) {
index e0ed4c60f34fe3f7f3ea2b2c5e7a01b6a92efec5..b648ad2262a4e4f1b3fac80a4bba89facf0dee4a 100644 (file)
@@ -352,7 +352,7 @@ stats_config(
                }
                (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);
index 4843c6d0e1754f4e82e831f91a0057ed93f2cc2f..ada545366ff6a87433cd2d32f5bf801c43663fa7 100644 (file)
@@ -339,8 +339,8 @@ ntpdmain(
 {
        l_fp now;
        char *cp;
-       u_int n;
 #ifdef AUTOKEY
+       u_int n;
        char hostname[MAXFILENAME];
 #endif /* AUTOKEY */
        struct recvbuf *rbuflist;