From f0fc48922bcf3c3e1c9f752510ae0a576e89b6ab Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Tue, 1 Mar 2016 10:56:46 +0800 Subject: [PATCH] [finsh] use the macro definition instead of the const number in the code --- components/finsh/finsh.h | 2 +- components/finsh/shell.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/finsh/finsh.h b/components/finsh/finsh.h index 71b788f9f3..e80eaab178 100644 --- a/components/finsh/finsh.h +++ b/components/finsh/finsh.h @@ -367,7 +367,7 @@ struct finsh_token int int_value; long long_value; } value; - u_char string[128]; + u_char string[FINSH_STRING_MAX]; u_char* line; }; diff --git a/components/finsh/shell.c b/components/finsh/shell.c index a04214b727..ae0934f5d1 100644 --- a/components/finsh/shell.c +++ b/components/finsh/shell.c @@ -543,7 +543,7 @@ void finsh_thread_entry(void *parameter) ch = 0; shell->line_position ++; shell->line_curpos++; - if (shell->line_position >= 80) + if (shell->line_position >= FINSH_CMD_SIZE) { /* clear command line */ shell->line_position = 0;