@@ -104,7 +104,7 @@ static void mbed_lwip_socket_callback(struct netconn *nc, enum netconn_evt eh, u
104
104
/* TCP/IP and Network Interface Initialisation */
105
105
static struct netif lwip_netif ;
106
106
static bool lwip_dhcp = false;
107
- static char lwip_mac_address [NSAPI_MAC_SIZE ] = "\0" ;
107
+ static char lwip_mac_address [NSAPI_MAC_SIZE ];
108
108
109
109
#if !LWIP_IPV4 || !LWIP_IPV6
110
110
static bool all_zeros (const uint8_t * p , int len )
@@ -309,13 +309,13 @@ static void mbed_lwip_netif_status_irq(struct netif *lwip_netif)
309
309
static void mbed_lwip_set_mac_address (void )
310
310
{
311
311
#if (MBED_MAC_ADDRESS_SUM != MBED_MAC_ADDR_INTERFACE )
312
- snprintf (lwip_mac_address , 19 , "%02x:%02x:%02x:%02x:%02x:%02x" ,
312
+ snprintf (lwip_mac_address , NSAPI_MAC_SIZE , "%02x:%02x:%02x:%02x:%02x:%02x" ,
313
313
MBED_MAC_ADDR_0 , MBED_MAC_ADDR_1 , MBED_MAC_ADDR_2 ,
314
314
MBED_MAC_ADDR_3 , MBED_MAC_ADDR_4 , MBED_MAC_ADDR_5 );
315
315
#else
316
316
char mac [6 ];
317
317
mbed_mac_address (mac );
318
- snprintf (lwip_mac_address , 19 , "%02x:%02x:%02x:%02x:%02x:%02x" ,
318
+ snprintf (lwip_mac_address , NSAPI_MAC_SIZE , "%02x:%02x:%02x:%02x:%02x:%02x" ,
319
319
mac [0 ], mac [1 ], mac [2 ], mac [3 ], mac [4 ], mac [5 ]);
320
320
#endif
321
321
}
0 commit comments