Fix naming in fd_writable

This commit is contained in:
Maxime Coste 2017-08-29 08:32:47 +07:00
parent a06dbfac7d
commit 5b43c46b75

View File

@ -158,12 +158,12 @@ bool fd_readable(int fd)
bool fd_writable(int fd) bool fd_writable(int fd)
{ {
fd_set rfds; fd_set wfds;
FD_ZERO(&rfds); FD_ZERO(&wfds);
FD_SET(fd, &rfds); FD_SET(fd, &wfds);
timeval tv{0,0}; timeval tv{0,0};
return select(fd+1, nullptr, &rfds, nullptr, &tv) == 1; return select(fd+1, nullptr, &wfds, nullptr, &tv) == 1;
} }
String read_fd(int fd, bool text) String read_fd(int fd, bool text)