summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon Goldschmidt <[email protected]>2018-06-07 20:48:18 +0200
committerSimon Goldschmidt <[email protected]>2018-06-07 20:48:18 +0200
commitab922582dc645efe6feee9d975c48999e643f2e1 (patch)
treefdbfb71c620b5d98e432b30f37c5a2afd1767e56 /doc
parentb1ffb3a8d3b5766d7072dda4a1c9f9de3ff71cdd (diff)
docs: use ETH_HWADDR_LEN, not sizeof(netif->hwaddr)
Diffstat (limited to 'doc')
-rw-r--r--doc/NO_SYS_SampleCode.c4
1 files 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;
}