From: Danny Mayer Date: Sun, 21 May 2006 18:57:46 +0000 (-0400) Subject: Bug #614 Remove errno manipulation from move_fd() X-Git-Tag: NTP_4_2_1P254_RC~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5241dd7430d60539351f9dee68220eab732338de;p=thirdparty%2Fntp.git Bug #614 Remove errno manipulation from move_fd() bk: 4470b82a56a5RFh_5cgZh5bojw8kVw --- diff --git a/ntpd/ntp_io.c b/ntpd/ntp_io.c index 72c57f663..5a99737fe 100644 --- a/ntpd/ntp_io.c +++ b/ntpd/ntp_io.c @@ -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