summaryrefslogtreecommitdiffstats
path: root/applypatch/imgdiff.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2020-07-24 21:12:49 +0200
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-07-24 21:12:49 +0200
commit74538db6848e1a315923ec765436b62eb3147537 (patch)
treec7a4a5e7fb5b66842c745aef778e6d4cfc2b886d /applypatch/imgdiff.cpp
parentMerge "Add recovery support of dynamic fingerprints" am: dca4844328 (diff)
parentMerge changes I0f3f0333,If447b2cf (diff)
downloadandroid_bootable_recovery-74538db6848e1a315923ec765436b62eb3147537.tar
android_bootable_recovery-74538db6848e1a315923ec765436b62eb3147537.tar.gz
android_bootable_recovery-74538db6848e1a315923ec765436b62eb3147537.tar.bz2
android_bootable_recovery-74538db6848e1a315923ec765436b62eb3147537.tar.lz
android_bootable_recovery-74538db6848e1a315923ec765436b62eb3147537.tar.xz
android_bootable_recovery-74538db6848e1a315923ec765436b62eb3147537.tar.zst
android_bootable_recovery-74538db6848e1a315923ec765436b62eb3147537.zip
Diffstat (limited to 'applypatch/imgdiff.cpp')
-rw-r--r--applypatch/imgdiff.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/applypatch/imgdiff.cpp b/applypatch/imgdiff.cpp
index 91007ac3b..85860281a 100644
--- a/applypatch/imgdiff.cpp
+++ b/applypatch/imgdiff.cpp
@@ -1038,20 +1038,21 @@ bool ZipModeImage::AddSplitImageFromChunkList(const ZipModeImage& tgt_image,
split_tgt_image.Initialize(aligned_tgt_chunks, {});
split_tgt_image.MergeAdjacentNormalChunks();
- // Construct the dummy source file based on the src_ranges.
- std::vector<uint8_t> src_content;
+ // Construct the split source file based on the split src ranges.
+ std::vector<uint8_t> split_src_content;
for (const auto& r : split_src_ranges) {
size_t end = std::min(src_image.file_content_.size(), r.second * BLOCK_SIZE);
- src_content.insert(src_content.end(), src_image.file_content_.begin() + r.first * BLOCK_SIZE,
- src_image.file_content_.begin() + end);
+ split_src_content.insert(split_src_content.end(),
+ src_image.file_content_.begin() + r.first * BLOCK_SIZE,
+ src_image.file_content_.begin() + end);
}
// We should not have an empty src in our design; otherwise we will encounter an error in
- // bsdiff since src_content.data() == nullptr.
- CHECK(!src_content.empty());
+ // bsdiff since split_src_content.data() == nullptr.
+ CHECK(!split_src_content.empty());
ZipModeImage split_src_image(true);
- split_src_image.Initialize(split_src_chunks, src_content);
+ split_src_image.Initialize(split_src_chunks, split_src_content);
split_tgt_images->push_back(std::move(split_tgt_image));
split_src_images->push_back(std::move(split_src_image));