fd.c: Simplify para_select().
authorAndre Noll <maan@systemlinux.org>
Sun, 5 Jul 2009 20:39:36 +0000 (22:39 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 5 Jul 2009 20:39:36 +0000 (22:39 +0200)
No need  to save errno into an extra variable.

fd.c

diff --git a/fd.c b/fd.c
index 1c67f22bb284ab11ffda80bb90c0693661b0328c..c3099f2c7c0ef06162ec25044646290f0e014c1e 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -114,11 +114,10 @@ int file_exists(const char *fn)
 int para_select(int n, fd_set *readfds, fd_set *writefds,
                struct timeval *timeout_tv)
 {
-       int ret, err;
-       do {
+       int ret;
+       do
                ret = select(n, readfds, writefds, NULL, timeout_tv);
-               err = errno;
-       } while (ret < 0 && err == EINTR);
+       while (ret < 0 && errno == EINTR);
        if (ret < 0)
                return -ERRNO_TO_PARA_ERROR(errno);
        return ret;