From ab922582dc645efe6feee9d975c48999e643f2e1 Mon Sep 17 00:00:00 2001 From: Simon Goldschmidt Date: Thu, 7 Jun 2018 20:48:18 +0200 Subject: [PATCH] docs: use ETH_HWADDR_LEN, not sizeof(netif->hwaddr) --- doc/NO_SYS_SampleCode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/NO_SYS_SampleCode.c b/doc/NO_SYS_SampleCode.c index f0af6600..71f1c9f7 100644 --- a/doc/NO_SYS_SampleCode.c +++ b/doc/NO_SYS_SampleCode.c @@ -56,8 +56,8 @@ netif_init(struct netif *netif) netif->flags = NETIF_FLAG_BROADCAST | NETIF_FLAG_ETHARP | NETIF_FLAG_ETHERNET | NETIF_FLAG_IGMP | NETIF_FLAG_MLD6; MIB2_INIT_NETIF(netif, snmp_ifType_ethernet_csmacd, 100000000); - SMEMCPY(netif->hwaddr, your_mac_address_goes_here, sizeof(netif->hwaddr)); - netif->hwaddr_len = sizeof(netif->hwaddr); + SMEMCPY(netif->hwaddr, your_mac_address_goes_here, ETH_HWADDR_LEN); + netif->hwaddr_len = ETH_HWADDR_LEN; return ERR_OK; }