Преглед изворни кода

[finsh] use the macro definition instead of the const number in the code

Bernard Xiong пре 9 година
родитељ
комит
f0fc48922b
2 измењених фајлова са 2 додато и 2 уклоњено
  1. 1 1
      components/finsh/finsh.h
  2. 1 1
      components/finsh/shell.c

+ 1 - 1
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;
 };

+ 1 - 1
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;