Fix assertions in udpecho.c

This commit is contained in:
Dirk Ziegelmeier 2018-11-02 20:19:52 +01:00
parent 33325bbf3b
commit ba705d3f7f

View File

@ -51,12 +51,13 @@ udpecho_thread(void *arg)
#if LWIP_IPV6 #if LWIP_IPV6
conn = netconn_new(NETCONN_UDP_IPV6); conn = netconn_new(NETCONN_UDP_IPV6);
LWIP_ERROR("udpecho: invalid conn", (conn != NULL), return;);
netconn_bind(conn, IP6_ADDR_ANY, 7); netconn_bind(conn, IP6_ADDR_ANY, 7);
#else /* LWIP_IPV6 */ #else /* LWIP_IPV6 */
conn = netconn_new(NETCONN_UDP); conn = netconn_new(NETCONN_UDP);
LWIP_ERROR("udpecho: invalid conn", (conn != NULL), return;);
netconn_bind(conn, IP_ADDR_ANY, 7); netconn_bind(conn, IP_ADDR_ANY, 7);
#endif /* LWIP_IPV6 */ #endif /* LWIP_IPV6 */
LWIP_ERROR("udpecho: invalid conn", (conn != NULL), return;);
while (1) { while (1) {
err = netconn_recv(conn, &buf); err = netconn_recv(conn, &buf);