The handling of LWIP_SOCKET_OFFSET looks inconsistent.
Suppose LWIP_SOCKET_OFFSET is 100 and LWIP_SOCKET_OPEN_COUNT is
defined.  The first alloc_socket call sets newsock->count = 100
and returns 100.  However, if get_socket(100) is then called,
it first subtracts LWIP_SOCKET_OFFSET from s, resulting in 0,
and then compares sock->count to 0; won't match.

I guess this mismatch does not harm the Hurd if you define
LWIP_SOCKET_OFFSET as 0 there, but I'd like to see it fixed
anyway.

Reply via email to