select - should I use FD_SETSIZE or max fd

Hello group,

The man pages say that the first parameter to select (nfds) should be "an integer one more than the maximum of any file descriptor in any of the sets", but I often see the code that uses FD_SETSIZE like this:

Thanks. I checked this by opening more than 1024 files and it failed after it returned file descriptor 1023. Now it makes sense because I assumed existence of descriptors greater than 1024 and generally random numbers but as it turns out it is not the case: "The file descriptor returned by a successful call [to open] will be the lowest-numbered file descriptor not currently open for the process."