fix: A核代码静态告警定期清理

【背景】A核代码静态告警定期清理

【修改方案】
1,根据codex等工具分析结果,进行必要的规范等问题修改

【影响】
对现有的产品编译不会有影响。

re #I4I0O8
Signed-off-by: wangchen <253227059@qq.com>
This commit is contained in:
lnlan
2021-11-12 07:32:39 +00:00
parent f63ce99399
commit 9ba725c3d4
22 changed files with 144 additions and 135 deletions

View File

@@ -110,12 +110,12 @@ static int DoShellExec(char **argv)
}
memset_s(cmdLine, len, 0, len);
for(j = 0; j < i; j++) {
for (j = 0; j < i; j++) {
strcat_s(cmdLine, len, argv[j]);
strcat_s(cmdLine, len, " ");
}
cmdLine[len - 2] = '\0';
cmdLine[len - 2] = '\0'; /* 2, (len - 2) is the end of cmdline buf */
ret = syscall(__NR_shellexec, argv[0], cmdLine);
free(cmdLine);
return ret;