From 683dcc711c249f1cb689a04ada046364067e6540 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 12 Jan 2009 18:11:52 +0100 Subject: [PATCH] para_fd_set(): Replace check for invalid fds by an assert(). --- fd.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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); -- 2.39.5