X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=fd.c;h=b8d1062d1ce98628468dfd7b184f4db346ef60ee;hb=bb899fb1a0c279a2890ff30d11bf7aec50fb92ed;hp=f7e0e42b3680707774cddd5c3bbd0c56cfc54bcb;hpb=e854df2fe2cfb3ae90a439828fc13cc0fc470aa9;p=paraslash.git diff --git a/fd.c b/fd.c index f7e0e42b..b8d1062d 100644 --- a/fd.c +++ b/fd.c @@ -376,34 +376,6 @@ __must_check int mark_fd_nonblocking(int fd) return 1; } -/** - * Set a file descriptor in a fd_set. - * - * \param fd The file descriptor to be set. - * \param fds The file descriptor set. - * \param max_fileno Highest-numbered file descriptor. - * - * This wrapper for FD_SET() passes its first two arguments to \p FD_SET. Upon - * return, \a max_fileno contains the maximum of the old_value and \a fd. - * - * \sa \ref para_select. -*/ -void para_fd_set(int fd, fd_set *fds, int *max_fileno) -{ - assert(fd >= 0 && fd < FD_SETSIZE); -#if 0 - { - int flags = fcntl(fd, F_GETFL); - if (!(flags & O_NONBLOCK)) { - PARA_EMERG_LOG("fd %d is a blocking file descriptor\n", fd); - exit(EXIT_FAILURE); - } - } -#endif - FD_SET(fd, fds); - *max_fileno = PARA_MAX(*max_fileno, fd); -} - /** * Paraslash's wrapper for mmap. *