projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3c27f3
)
fd.c: Simplify write_ok().
author
Andre Noll
<maan@systemlinux.org>
Sun, 5 Jul 2009 20:40:12 +0000
(22:40 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Sun, 5 Jul 2009 20:40:12 +0000
(22:40 +0200)
Use para_select() rather than open-code it.
fd.c
patch
|
blob
|
history
diff --git
a/fd.c
b/fd.c
index
c3099f2
..
23b89b5
100644
(file)
--- a/
fd.c
+++ b/
fd.c
@@
-445,18
+445,14
@@
int para_munmap(void *start, size_t length)
int write_ok(int fd)
{
- struct timeval tv
= {0, 0}
;
+ struct timeval tv;
fd_set wfds;
- int ret;
-again:
+
FD_ZERO(&wfds);
FD_SET(fd, &wfds);
tv.tv_sec = 0;
tv.tv_usec = 0;
- ret = select(fd + 1, NULL, &wfds, NULL, &tv);
- if (ret < 0 && errno == EINTR)
- goto again;
- return ret;
+ return para_select(fd + 1, NULL, &wfds, &tv);
}
/**