Don't allocate dhcp_state structure when DHCP is not configured
This commit is contained in:
parent
b674f5cd33
commit
b9c287ceff
@ -102,13 +102,13 @@ static int tcpecho_netsetup()
|
||||
* network has already been configured by NSH's start-up logic.
|
||||
*/
|
||||
|
||||
struct dhcpc_state ds;
|
||||
#ifndef CONFIG_NSH_BUILTIN_APPS
|
||||
struct in_addr addr;
|
||||
#if defined(CONFIG_EXAMPLES_TCPECHO_DHCPC) || defined(CONFIG_EXAMPLES_TCPECHO_NOMAC)
|
||||
uint8_t mac[IFHWADDRLEN];
|
||||
#endif
|
||||
#ifdef CONFIG_EXAMPLES_TCPECHO_DHCPC
|
||||
struct dhcpc_state ds;
|
||||
void *handle;
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user