fix:修复函数返回错误等问题

Signed-off-by: zhangdengyu <zhangdengyu2@huawei.com>
This commit is contained in:
zhangdengyu
2022-09-24 17:04:38 +08:00
parent 453c376198
commit dd8d48a2bf
34 changed files with 83 additions and 79 deletions

View File

@@ -145,7 +145,7 @@ INT32 CmdLog(INT32 argc, const CHAR **argv)
}
} else if (!strncmp(argv[0], "module", strlen(argv[0]) + 1)) {
module = strtoul(argv[1], &p, 0);
if ((*p != 0) || (module > MODULE4) || (module < MODULE0)) {
if ((*p != 0) || (module > MODULE4) || (module == MODULE0)) {
PRINTK("log %s can't access %s\n", argv[0], argv[1]);
PRINTK("not support yet\n");
return -1;

View File

@@ -329,7 +329,7 @@ END:
LITE_OS_SEC_TEXT_MINOR UINT32 ShellEntry(UINTPTR param)
{
CHAR ch;
INT32 n = 0;
INT32 n;
ShellCB *shellCB = (ShellCB *)param;
CONSOLE_CB *consoleCB = OsGetConsoleByID((INT32)shellCB->consoleID);