From a3c27f324e4de20322a90ac9a8625d0d87797ff8 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 5 Jul 2009 22:39:36 +0200 Subject: [PATCH] fd.c: Simplify para_select(). No need to save errno into an extra variable. --- fd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fd.c b/fd.c index 1c67f22b..c3099f2c 100644 --- 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; -- 2.39.2