mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-24 15:16:02 +00:00
Included some missing braces in lwip_send & lwip_sendto (if !LWIP_UDP && !LWIP_RAW)
This commit is contained in:
parent
2442b985bf
commit
b5ab0c5285
|
@ -477,13 +477,14 @@ lwip_send(int s, const void *data, int size, unsigned int flags)
|
||||||
if (!sock)
|
if (!sock)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (sock->conn->type!=NETCONN_TCP)
|
if (sock->conn->type!=NETCONN_TCP) {
|
||||||
#if (LWIP_UDP || LWIP_RAW)
|
#if (LWIP_UDP || LWIP_RAW)
|
||||||
return lwip_sendto(s, data, size, flags, NULL, 0);
|
return lwip_sendto(s, data, size, flags, NULL, 0);
|
||||||
#else
|
#else
|
||||||
sock_set_errno(sock, err_to_errno(ERR_ARG));
|
sock_set_errno(sock, err_to_errno(ERR_ARG));
|
||||||
return -1;
|
return -1;
|
||||||
#endif /* (LWIP_UDP || LWIP_RAW) */
|
#endif /* (LWIP_UDP || LWIP_RAW) */
|
||||||
|
}
|
||||||
|
|
||||||
err = netconn_write(sock->conn, data, size, NETCONN_COPY);
|
err = netconn_write(sock->conn, data, size, NETCONN_COPY);
|
||||||
|
|
||||||
|
@ -506,13 +507,14 @@ lwip_sendto(int s, const void *data, int size, unsigned int flags,
|
||||||
if (!sock)
|
if (!sock)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (sock->conn->type==NETCONN_TCP)
|
if (sock->conn->type==NETCONN_TCP) {
|
||||||
#if LWIP_TCP
|
#if LWIP_TCP
|
||||||
return lwip_send(s, data, size, flags);
|
return lwip_send(s, data, size, flags);
|
||||||
#else
|
#else
|
||||||
sock_set_errno(sock, err_to_errno(ERR_ARG));
|
sock_set_errno(sock, err_to_errno(ERR_ARG));
|
||||||
return -1;
|
return -1;
|
||||||
#endif /* LWIP_TCP */
|
#endif /* LWIP_TCP */
|
||||||
|
}
|
||||||
|
|
||||||
LWIP_ASSERT("lwip_sendto: invalid address", (((to==NULL) && (tolen==0)) ||
|
LWIP_ASSERT("lwip_sendto: invalid address", (((to==NULL) && (tolen==0)) ||
|
||||||
((tolen == sizeof(struct sockaddr_in)) &&
|
((tolen == sizeof(struct sockaddr_in)) &&
|
||||||
|
|
Loading…
Reference in New Issue
Block a user