codecheck清理

Signed-off-by: 王达 <wangda20@huawei.com>
This commit is contained in:
王达 2024-05-09 20:40:44 +08:00
parent f18162f90e
commit c1bb0cddff
3 changed files with 3 additions and 4 deletions

View File

@ -95,7 +95,7 @@ int NativeInstallHnp(const char *userId, const char *hapPath, const char *hnpRoo
return HNP_API_NOT_IN_DEVELOPER_MODE;
}
if ((userId == NULL) || (hapPath == NULL)|| (hnpRootPath == NULL) || (packageName == NULL)) {
if ((userId == NULL) || (hapPath == NULL) || (hnpRootPath == NULL) || (packageName == NULL)) {
return HNP_API_ERRNO_PARAM_INVALID;
}

View File

@ -312,7 +312,6 @@ int HnpUnZip(const char *inputFile, const char *outputDir)
int HnpCfgGetFromZip(const char *inputFile, HnpCfgInfo *hnpCfg)
{
char fileName[MAX_FILE_PATH_LEN];
char *fileNameTmp;
unz_file_info fileInfo;
char *cfgStream = NULL;
@ -330,7 +329,7 @@ int HnpCfgGetFromZip(const char *inputFile, HnpCfgInfo *hnpCfg)
unzClose(zipFile);
return HNP_ERRNO_BASE_UNZIP_GET_INFO_FAILED;
}
fileNameTmp = strrchr(fileName, DIR_SPLIT_SYMBOL);
char *fileNameTmp = strrchr(fileName, DIR_SPLIT_SYMBOL);
if (fileNameTmp == NULL) {
fileNameTmp = fileName;
} else {

View File

@ -118,7 +118,7 @@ static int GetHnpCfgInfo(const char *hnpCfgPath, const char *sourcePath, HnpCfgI
/* 校验软连接的source文件是否存在 */
linkArr = hnpCfg->links;
for (unsigned int i = 0; i < hnpCfg->linkNum; i++, linkArr++) {
int ret = sprintf_s(linksource, MAX_FILE_PATH_LEN, "%s/%s", sourcePath, linkArr->source);
ret = sprintf_s(linksource, MAX_FILE_PATH_LEN, "%s/%s", sourcePath, linkArr->source);
if (ret < 0) {
free(hnpCfg->links);
hnpCfg->links = NULL;