mirror of
https://gitee.com/openharmony/startup_appspawn
synced 2024-11-27 01:00:38 +00:00
codecheck清理
Signed-off-by: 王达 <wangda20@huawei.com>
This commit is contained in:
parent
f18162f90e
commit
c1bb0cddff
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user