minor derivative to reduce compiler warnings and tag read-only parameters as const.
Fork of lwip by
Diff: api/sockets.c
- Revision:
- 21:d78ed585db09
- Parent:
- 0:51ac1d130fd4
--- a/api/sockets.c Tue Jul 07 14:09:21 2015 +0000 +++ b/api/sockets.c Sun Jun 10 22:17:20 2018 +0000 @@ -414,7 +414,7 @@ /* check size, familiy and alignment of 'name' */ LWIP_ERROR("lwip_bind: invalid address", ((namelen == sizeof(struct sockaddr_in)) && ((name->sa_family) == AF_INET) && ((((mem_ptr_t)name) % 4) == 0)), - sock_set_errno(sock, err_to_errno(ERR_ARG)); return -1;); + sock_set_errno(sock, err_to_errno(ERR_ARG)); return -2;); name_in = (const struct sockaddr_in *)(void*)name; inet_addr_to_ipaddr(&local_addr, &name_in->sin_addr); @@ -429,7 +429,7 @@ if (err != ERR_OK) { LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d) failed, err=%d\n", s, err)); sock_set_errno(sock, err_to_errno(err)); - return -1; + return -3; } LWIP_DEBUGF(SOCKETS_DEBUG, ("lwip_bind(%d) succeeded\n", s));