提交 27029c33 编写于 作者: J Jovi Zhang 提交者: Jason Wessel

kdb: code cleanup to use macro instead of value

It's better to use macro KDB_BASE_CMD_MAX instead of 50
Signed-off-by: NJovi Zhang <bookjovi@gmail.com>
Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
上级 adb4b83c
...@@ -78,7 +78,7 @@ static unsigned int kdb_continue_catastrophic; ...@@ -78,7 +78,7 @@ static unsigned int kdb_continue_catastrophic;
static kdbtab_t *kdb_commands; static kdbtab_t *kdb_commands;
#define KDB_BASE_CMD_MAX 50 #define KDB_BASE_CMD_MAX 50
static int kdb_max_commands = KDB_BASE_CMD_MAX; static int kdb_max_commands = KDB_BASE_CMD_MAX;
static kdbtab_t kdb_base_commands[50]; static kdbtab_t kdb_base_commands[KDB_BASE_CMD_MAX];
#define for_each_kdbcmd(cmd, num) \ #define for_each_kdbcmd(cmd, num) \
for ((cmd) = kdb_base_commands, (num) = 0; \ for ((cmd) = kdb_base_commands, (num) = 0; \
num < kdb_max_commands; \ num < kdb_max_commands; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册