!3567 [fix]init代码告警处理 5.0.1-release

Merge pull request !3567 from 林楠木/gaojin501
This commit is contained in:
openharmony_ci 2025-01-26 10:13:57 +00:00 committed by Gitee
commit 59b5be1f46
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -54,6 +54,10 @@ static int HandleCmd(BShellHandle shell, const char *cmdName, int argc, char **a
static int SetInitLogLevelFromParam(BShellHandle shell, int argc, char **argv)
{
if (argv == NULL) {
BSH_LOGE("SetInitLogLevelFromParam Failed, argv is NULL");
return -1;
}
if (argc != 2) { // 2 is set log level parameter number
char *helpArgs[] = {"set", NULL};
BShellCmdHelp(shell, 1, helpArgs);