No need to save errno into an extra variable.
int para_select(int n, fd_set *readfds, fd_set *writefds,
struct timeval *timeout_tv)
{
int para_select(int n, fd_set *readfds, fd_set *writefds,
struct timeval *timeout_tv)
{
ret = select(n, readfds, writefds, NULL, timeout_tv);
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;
if (ret < 0)
return -ERRNO_TO_PARA_ERROR(errno);
return ret;