Don't allocate dhcp_state structure when DHCP is not configured

This commit is contained in:
Gregory Nutt 2013-05-23 06:54:20 -06:00
parent b674f5cd33
commit b9c287ceff

View File

@ -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