]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Bug #614 Remove errno manipulation from move_fd()
authorDanny Mayer <mayer@ntp.org>
Sun, 21 May 2006 18:57:46 +0000 (14:57 -0400)
committerDanny Mayer <mayer@ntp.org>
Sun, 21 May 2006 18:57:46 +0000 (14:57 -0400)
bk: 4470b82a56a5RFh_5cgZh5bojw8kVw

ntpd/ntp_io.c

index 72c57f663d551613a6543237d5ce75af3473df80..5a99737fe8cbb942c4503e8df16a1bdddb0753d3 100644 (file)
@@ -251,21 +251,19 @@ connection_reset_fix(SOCKET fd) {
 #if !defined(SYS_WINNT) && defined(F_DUPFD)
 static int move_fd(int fd)
 {
-       int tmp, newfd;
+       int newfd;
         /*
          * Leave a space for stdio to work in.
          */
         if (fd >= 0 && fd < FOPEN_MAX) {
                 newfd = fcntl(fd, F_DUPFD, FOPEN_MAX);
 
-                tmp = errno;
                 if (newfd == -1)
                {
                        msyslog(LOG_ERR, "Error duplicating file descriptor: %m");
                         return (fd);
                }
                 (void)close(fd);
-                errno = tmp;
                 return (newfd);
         }
        else