para_fd_set(): Replace check for invalid fds by an assert().
authorAndre Noll <maan@systemlinux.org>
Mon, 12 Jan 2009 17:11:52 +0000 (18:11 +0100)
committerAndre Noll <maan@systemlinux.org>
Mon, 12 Jan 2009 17:11:52 +0000 (18:11 +0100)
fd.c

diff --git a/fd.c b/fd.c
index 9942eb9..6d32e93 100644 (file)
--- a/fd.c
+++ b/fd.c
@@ -174,11 +174,7 @@ __must_check int mark_fd_nonblocking(int fd)
 */
 void para_fd_set(int fd, fd_set *fds, int *max_fileno)
 {
-
-       if (fd < 0 || fd >= FD_SETSIZE) {
-               PARA_EMERG_LOG("fatal: tried to add invalid fd %d\n", fd);
-               exit(EXIT_FAILURE);
-       }
+       assert(fd >= 0 && fd < FD_SETSIZE);
 #if 0
        {
                int flags = fcntl(fd, F_GETFL);