tcp_cmd
Move next ptr to the top
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user