From: Andre Noll Date: Sun, 5 Jul 2009 20:39:36 +0000 (+0200) Subject: fd.c: Simplify para_select(). X-Git-Tag: v0.4.0~58 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=a3c27f324e4de20322a90ac9a8625d0d87797ff8;ds=inline fd.c: Simplify para_select(). No need to save errno into an extra variable. --- 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;