4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-20 20:57:12 +08:00

Update ethernetif.c

This commit is contained in:
David Lin 2020-06-10 11:09:11 +08:00 committed by GitHub
parent a5fddaecc3
commit 4f53c68b3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -499,7 +499,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;