diff --git a/tests/tcp_cmd.cpp b/tests/tcp_cmd.cpp index a44ac65..ce19a27 100644 --- a/tests/tcp_cmd.cpp +++ b/tests/tcp_cmd.cpp @@ -206,6 +206,7 @@ static err_t tcp_cmd_recv_new(void* arg, struct tcp_pcb* pcb, struct pbuf* p, er char cmd[MAX_CMD_LEN]; char* argv[MAX_TOKENS]; bool close_conn = false; + char* next; LWIP_UNUSED_ARG(arg); LOG_DEBUG(TAG, "TCP data received"); @@ -221,8 +222,6 @@ static err_t tcp_cmd_recv_new(void* arg, struct tcp_pcb* pcb, struct pbuf* p, er return ERR_OK; } - char* next; - // Make sure the string is null terminated if (p->len >= MAX_CMD_LEN) { LOG_WARN(TAG, "Command too long");