From b9c287ceffb6803656a383c3e30b8ee2f1e6b825 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 23 May 2013 06:54:20 -0600 Subject: [PATCH] Don't allocate dhcp_state structure when DHCP is not configured --- examples/tcpecho/tcpecho_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tcpecho/tcpecho_main.c b/examples/tcpecho/tcpecho_main.c index c26462f14..e70028fce 100644 --- a/examples/tcpecho/tcpecho_main.c +++ b/examples/tcpecho/tcpecho_main.c @@ -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