mirror of
https://github.com/openharmony/bundlemanager_bundle_framework_lite.git
synced 2026-07-23 09:05:25 -04:00
@@ -672,10 +672,9 @@ static int32_t GenerateInnerUid(std::map<int, std::string> &innerMap, const std:
|
||||
}
|
||||
int32_t ret = 0;
|
||||
for (int32_t i = 0; i < innerMap.rbegin()->first; ++i) {
|
||||
if (innerMap.find(i) == innerMap.end()) {
|
||||
innerMap.emplace(i, bundleName);
|
||||
ret = i + baseUid;
|
||||
return ret;
|
||||
auto res = innerMap.emplace(i, bundleName);
|
||||
if (res.second) {
|
||||
return i + baseUid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -120,13 +120,6 @@ BOOL BundleMsFeature::OnFeatureMessage(Feature *feature, Request *request)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void InnerFreeDataBuff(void *ptr)
|
||||
{
|
||||
if (ptr != nullptr) {
|
||||
cJSON_free(ptr);
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t BundleMsFeature::HasSystemCapability(const uint8_t funcId, IpcIo *req, IpcIo *reply)
|
||||
{
|
||||
if ((req == nullptr) || (reply == nullptr)) {
|
||||
|
||||
@@ -140,7 +140,8 @@ bool ZipFile::ParseAllEntries()
|
||||
break;
|
||||
}
|
||||
|
||||
size_t fileLength = (directoryEntry.nameSize >= MAX_FILE_NAME) ? (MAX_FILE_NAME - 1) : (directoryEntry.nameSize);
|
||||
size_t fileLength =
|
||||
(directoryEntry.nameSize >= MAX_FILE_NAME) ? (MAX_FILE_NAME - 1) : (directoryEntry.nameSize);
|
||||
if (fread(&(fileName[0]), fileLength, FILE_READ_COUNT, file_) != FILE_READ_COUNT) {
|
||||
HILOG_ERROR(HILOG_MODULE_APP,
|
||||
"parse entry(%{public}d) read file name failed, error: %{public}s", i, strerror(errno));
|
||||
|
||||
Reference in New Issue
Block a user