From: Andre Noll Date: Mon, 12 Jan 2009 17:11:52 +0000 (+0100) Subject: para_fd_set(): Replace check for invalid fds by an assert(). X-Git-Tag: v0.3.4~75^2~14 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=683dcc711c249f1cb689a04ada046364067e6540 para_fd_set(): Replace check for invalid fds by an assert(). --- diff --git a/fd.c b/fd.c index 9942eb92..6d32e93e 100644 --- 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);