fms codex patch

Signed-off-by: zhaoyuan17@huawei.com <zhaoyuan17@huawei.com>
This commit is contained in:
zhaoyuan17@huawei.com 2021-09-28 22:43:55 +08:00
parent eeb9402917
commit 5b3032b442

View File

@ -95,7 +95,7 @@ ErrCode FormStorageMgr::LoadFormData(std::vector<InnerFormInfo> &innerFormInfos)
}
char fileNamePath[FORM_DB_DATA_BASE_FILE_PATH_LEN] = {0};
if (sprintf_s(fileNamePath, FORM_DB_DATA_BASE_FILE_PATH_LEN, "%s/%s",
FORM_DB_DATA_BASE_FILE_DIR, ptr->d_name) < 0) {
FORM_DB_DATA_BASE_FILE_DIR, ptr->d_name) < 0) {
APP_LOGE("%{public}s,strcat fileNamePath path fail", __func__);
return ERR_APPEXECFWK_FORM_COMMON_CODE;
}
@ -119,7 +119,7 @@ ErrCode FormStorageMgr::GetStorageFormInfoById(const std::string &formId, InnerF
APP_LOGD("%{public}s called, formId[%{public}s]", __func__, formId.c_str());
char fileNamePath[FORM_DB_DATA_BASE_FILE_PATH_LEN] = {0};
if (sprintf_s(fileNamePath, FORM_DB_DATA_BASE_FILE_PATH_LEN, "%s/%s.json",
FORM_DB_DATA_BASE_FILE_DIR, formId.c_str()) < 0) {
FORM_DB_DATA_BASE_FILE_DIR, formId.c_str()) < 0) {
APP_LOGE("%{public}s,strcat fileNamePath path fail", __func__);
return ERR_APPEXECFWK_FORM_COMMON_CODE;
}
@ -179,7 +179,7 @@ ErrCode FormStorageMgr::SaveStorageFormInfo(const InnerFormInfo &innerFormInfo)
}
char tmpFilePath[FORM_DB_DATA_BASE_FILE_PATH_LEN] = {0};
if (sprintf_s(tmpFilePath, FORM_DB_DATA_BASE_FILE_PATH_LEN, "%s/%s.json",
FORM_DB_DATA_BASE_FILE_DIR, formId.c_str()) < 0) {
FORM_DB_DATA_BASE_FILE_DIR, formId.c_str()) < 0) {
APP_LOGE("%{public}s,strcat tmpFilePath path fail", __func__);
return ERR_APPEXECFWK_FORM_COMMON_CODE;
}
@ -226,7 +226,7 @@ ErrCode FormStorageMgr::ModifyStorageFormInfo(const InnerFormInfo &innerFormInfo
APP_LOGI("%{public}s called, formId[%{public}" PRId64 "]", __func__, innerFormInfo.GetFormId());
char fileNamePath[FORM_DB_DATA_BASE_FILE_PATH_LEN] = {0};
if (sprintf_s(fileNamePath, FORM_DB_DATA_BASE_FILE_PATH_LEN, "%s/%" PRId64 ".json",
FORM_DB_DATA_BASE_FILE_DIR, innerFormInfo.GetFormId()) < 0) {
FORM_DB_DATA_BASE_FILE_DIR, innerFormInfo.GetFormId()) < 0) {
APP_LOGE("%{public}s,strcat fileNamePath path fail", __func__);
return ERR_APPEXECFWK_FORM_COMMON_CODE;
}
@ -259,7 +259,7 @@ ErrCode FormStorageMgr::DeleteStorageFormInfo(const std::string &formId) const
APP_LOGI("%{public}s called, formId[%{public}s]", __func__, formId.c_str());
char fileNamePath[FORM_DB_DATA_BASE_FILE_PATH_LEN] = {0};
if (sprintf_s(fileNamePath, FORM_DB_DATA_BASE_FILE_PATH_LEN, "%s/%s.json",
FORM_DB_DATA_BASE_FILE_DIR, formId.c_str()) < 0) {
FORM_DB_DATA_BASE_FILE_DIR, formId.c_str()) < 0) {
APP_LOGE("%{public}s,strcat fileNamePath path fail", __func__);
return ERR_APPEXECFWK_FORM_COMMON_CODE;
}