]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
[Bug 255] Lint cleanup
authorHarlan Stenn <stenn@ntp.org>
Sun, 30 Nov 2003 00:18:51 +0000 (19:18 -0500)
committerHarlan Stenn <stenn@ntp.org>
Sun, 30 Nov 2003 00:18:51 +0000 (19:18 -0500)
bk: 3fc9376bmdtCqkRGhUNdK-DYgTVcEg

ntpd/refclock_hopfpci.c
ntpd/refclock_neoclock4x.c
ntpdc/ntpdc.c
ntpq/ntpq.c

index 1b023198d8db51839cf86e0d5fa4b1f349198787..81c186d168bd21d3bfb05b29ad0a0df7034e10c0 100644 (file)
@@ -181,17 +181,11 @@ hopfpci_shutdown(
        struct peer *peer
        )
 {
-       struct refclockproc *pp;
-       register struct hopfpciTime *up;
-
-       pp = peer->procptr;
-       up = (struct hopfpciTime *)pp->unitptr;
 
 #ifndef SYS_WINNT
        close(fd);
 #else
        CloseHopfDevice();
-/*     UnmapViewOfFile (up); */
 #endif
 }
 
@@ -206,11 +200,9 @@ hopfpci_poll(
        )
 {
        struct refclockproc *pp;
-       register struct hopfpciTime *up;
        HOPFTIME m_time;
 
        pp = peer->procptr;
-       up = (struct hopfpciTime *)pp->unitptr;
 
 #ifndef SYS_WINNT
        ioctl(fd,HOPF_CLOCK_GET_UTC,&m_time);
index 082b1cffa69f454d7f427ebc06da55306b239f3a..6513507a65e8647e5649c47d73e5e6bbe3eb25d3 100644 (file)
@@ -678,11 +678,9 @@ neoclock4x_control(int unit,
 
   if(NULL != out)
     {
-      static char outstatus[800];      /* status output buffer */
       char *tt;
       char tmpbuf[80];
 
-      outstatus[0] = '\0';
       out->kv_list = (struct ctl_var *)0;
       out->type    = REFCLK_NEOCLOCK4X;
 
index aa4f188a603a77862437cecd690b5c840500aaad..b7f36841113d56ad3d9a914296c8a32a8ff2cb01 100644 (file)
@@ -502,6 +502,7 @@ openhost(
        {
                int optionValue = SO_SYNCHRONOUS_NONALERT;
                int err;
+
                err = setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&optionValue, sizeof(optionValue));
                if (err != NO_ERROR) {
                        (void) fprintf(stderr, "cannot open nonoverlapped sockets\n");
@@ -1383,7 +1384,6 @@ getnetnum(
        int af
        )
 {
-       int err;
        int sockaddr_len;
        struct addrinfo hints, *ai = NULL;
 
@@ -1404,7 +1404,7 @@ getnetnum(
                                    NI_NUMERICHOST); 
                }
                return 1;
-       } else if ((err = getaddrinfo(hname, "ntp", &hints, &ai)) == 0) {
+       } else if (getaddrinfo(hname, "ntp", &hints, &ai) == 0) {
                memmove((char *)num, ai->ai_addr, ai->ai_addrlen);
                if (fullhost != 0)
                        (void) strcpy(fullhost, ai->ai_canonname);
index a9500cacd76c21330b028468e00225cd4a679c02..cbb628315182491821cf4c3dd0b319777090954d 100644 (file)
@@ -684,6 +684,7 @@ openhost(
        {
                int optionValue = SO_SYNCHRONOUS_NONALERT;
                int err;
+
                err = setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, (char *)&optionValue, sizeof(optionValue));
                if (err != NO_ERROR) {
                        (void) fprintf(stderr, "cannot open nonoverlapped sockets\n");
@@ -1668,7 +1669,6 @@ getnetnum(
        int af
        )
 {
-       int err;
        int sockaddr_len;
        struct addrinfo hints, *ai = NULL;
 
@@ -1687,10 +1687,9 @@ getnetnum(
                        getnameinfo((struct sockaddr *)num, sockaddr_len,
                                        fullhost, sizeof(fullhost), NULL, 0,
                                        NI_NUMERICHOST);
-
                }
                return 1;
-       } else if ((err = getaddrinfo(hname, "ntp", &hints, &ai)) == 0) {
+       } else if (getaddrinfo(hname, "ntp", &hints, &ai) == 0) {
                memmove((char *)num, ai->ai_addr, ai->ai_addrlen);
                if (ai->ai_canonname != 0)
                    (void) strcpy(fullhost, ai->ai_canonname);