]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
eliminate no error select reporting
authorDanny Mayer <mayer@ntp.org>
Thu, 22 Jan 2004 00:35:11 +0000 (19:35 -0500)
committerDanny Mayer <mayer@ntp.org>
Thu, 22 Jan 2004 00:35:11 +0000 (19:35 -0500)
bk: 400f1abfhjOK2eUPgRsnnx0ckNl_JA

ntpdate/ntpdate.c

index 35ac1fa66d2429f45209fabb03a295a1a99c6020..4c61acce63b5742cf0efa0bb3463b122ba11cb15 100644 (file)
@@ -599,16 +599,13 @@ ntpdatemain (
 #endif
                        if (nfound > 0)
                                input_handler();
-                       else if (
 #ifndef SYS_WINNT
-                               nfound == -1
+                       else if (nfound == -1)
 #else
-                               nfound == SOCKET_ERROR
+                       else if (nfound == SOCKET_ERROR)
 #endif /* SYS_WINNT */
-                               ) {
-#ifndef SYS_WINNT
+                       {
                                if (errno != EINTR)
-#endif
                                        netsyslog(LOG_ERR,
 #ifdef HAVE_POLL_H
                                                "poll() error: %m"
@@ -616,7 +613,7 @@ ntpdatemain (
                                                "select() error: %m"
 #endif
                                                );
-                       } else {
+                       } else if (errno != 0) {
 #ifndef SYS_VXWORKS
                                netsyslog(LOG_DEBUG,
 #ifdef HAVE_POLL_H