I'm a bit uncertain here, so please correct me if I'm wrong. This is
from the CVS head, in sockets.c:
LWIP_ERROR("lwip_sendto: invalid address",
(((to == NULL) && (tolen == 0)) ||
((tolen == sizeof(struct sockaddr_in)) &&
((((struct sockaddr_in *)to)->sin_family) == AF_INET))),
sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;);
The first condition, ((to == NULL) && (tolen == 0)), is as far as I
can tell not desired, so shouldn't it be ((to != NULL) && (tolen !=
0)) instead?
The explanation for the LWIP_ERROR macro also seems to state the
opposite of what the code does, no?
/** print "m" message only if "e" is true, and execute "h" expression */
#ifndef LWIP_ERROR
#define LWIP_ERROR(m,e,h) do { if (!(e)) { LWIP_PLATFORM_ASSERT(m);
h;}} while(0)
#endif /* LWIP_ERROR */
Steinar
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users