Move next ptr to the top
This commit is contained in:
2023-11-30 14:34:12 +01:00
parent ed2e7ef650
commit 5bc3250c15

View File

@@ -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");