Subject: Re: Bug in FD_ISSET/FD_CLR/FD_SET?
To: Ted Lemon <>
From: Frank van der Linden <>
List: current-users
Date: 09/09/1999 10:09:27
On Wed, Sep 08, 1999 at 07:45:09PM -0700, Ted Lemon wrote:
> It seems to me that these macros are broken because they don't
> bounds-check the descriptor number.   I've included a proposed
> change.   Does anybody object (modulo compile errors, for which I have
> not yet tested)?

If a filedescriptor is given to one of these macros that is too large,
I'd consider that a programming error. Another problem is, that
there's no return value, so all you're adding is a silent failure mode.

This is about the same case as "should we check for NULL pointers in
things like fprintf" in my opinion. I don't think it's a good idea.

- Frank