未验证 提交 a5fddaec 编写于 作者: D David Lin 提交者: GitHub

Update ethernetif.c

上级 5f6c3d73
......@@ -452,7 +452,11 @@ rt_err_t eth_device_init_with_flag(struct eth_device *dev, const char *name, rt_
rt_kprintf("malloc netif failed\n");
return -RT_ERROR;
}
#if LWIP_NETIF_HOSTNAME
rt_memset(netif, 0, sizeof(struct netif) + LWIP_HOSTNAME_LEN);
#else
rt_memset(netif, 0, sizeof(struct netif));
#endif
/* set netif */
dev->netif = netif;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册