]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Actually, since the close calls shouldn't fail (now that listener
authorWayne Davison <wayned@samba.org>
Thu, 16 Sep 2004 17:22:31 +0000 (17:22 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 16 Sep 2004 17:22:31 +0000 (17:22 +0000)
is properly set to -1 on close), we don't really need to play the
save-errno game after all.

socket.c

index 8d21735e57c619fa269cb5c61cb7378c5e9c1513..5810c48b6bab3580854d9632bbd9b9bd32686627 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -687,7 +687,7 @@ static int socketpair_tcp(int fd[2])
        struct sockaddr_in sock;
        struct sockaddr_in sock2;
        socklen_t socklen = sizeof sock;
-       int errno_save, connect_done = 0;
+       int connect_done = 0;
 
        fd[0] = fd[1] = listener = -1;
 
@@ -741,14 +741,12 @@ static int socketpair_tcp(int fd[2])
        return 0;
 
  failed:
-       errno_save = errno;
        if (fd[0] != -1)
                close(fd[0]);
        if (fd[1] != -1)
                close(fd[1]);
        if (listener != -1)
                close(listener);
-       errno = errno_save;
        return -1;
 }