lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] wrong return in lwip_accept()


From: Fabian Koch
Subject: [lwip-devel] wrong return in lwip_accept()
Date: Thu, 11 Sep 2014 08:37:53 +0000

Hey all,

 

I noticed something in lwip_accept() that I found odd:

 

Line 404/405 of sockets.c are:

 

sock_set_errno(sock, EOPNOTSUPP);

return EOPNOTSUPP;

 

(see here https://github.com/tabascoeye/lwip/blob/master/src/api/sockets.c#L405 )

 

Now I don’t get why lwip_accept should return a positive integer here (which EOPNOTSUPP arguably is on most systems) when it really should return an error (-1) and it already has the last error value set up in errno.

 

Am I missing something here or is that a tiny bug?

 

Cheers,

Fabian


reply via email to

[Prev in Thread] Current Thread [Next in Thread]