summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2016-12-28 23:39:58 +0100
committerandroid-build-merger <android-build-merger@google.com>2016-12-28 23:39:58 +0100
commit7c09ac7e940a670850e258231f447ab26d0f0829 (patch)
tree6b4ae43dbd0332895398086c0c15669a415e219e
parentMerge "Add tests for imgdiff." am: 344c8eb453 am: 4fe022c4ed am: 4e2471d6dd (diff)
parentMerge "applypatch: Don't expose FindMatchingPatch()." am: b8d6523acf am: 29e1b7b4b2 (diff)
downloadandroid_bootable_recovery-7c09ac7e940a670850e258231f447ab26d0f0829.tar
android_bootable_recovery-7c09ac7e940a670850e258231f447ab26d0f0829.tar.gz
android_bootable_recovery-7c09ac7e940a670850e258231f447ab26d0f0829.tar.bz2
android_bootable_recovery-7c09ac7e940a670850e258231f447ab26d0f0829.tar.lz
android_bootable_recovery-7c09ac7e940a670850e258231f447ab26d0f0829.tar.xz
android_bootable_recovery-7c09ac7e940a670850e258231f447ab26d0f0829.tar.zst
android_bootable_recovery-7c09ac7e940a670850e258231f447ab26d0f0829.zip
-rw-r--r--applypatch/applypatch.cpp2
-rw-r--r--applypatch/include/applypatch/applypatch.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp
index 8682e128b..500663120 100644
--- a/applypatch/applypatch.cpp
+++ b/applypatch/applypatch.cpp
@@ -391,7 +391,7 @@ int ParseSha1(const char* str, uint8_t* digest) {
// Search an array of sha1 strings for one matching the given sha1.
// Return the index of the match on success, or -1 if no match is
// found.
-int FindMatchingPatch(uint8_t* sha1, const std::vector<std::string>& patch_sha1_str) {
+static int FindMatchingPatch(uint8_t* sha1, const std::vector<std::string>& patch_sha1_str) {
for (size_t i = 0; i < patch_sha1_str.size(); ++i) {
uint8_t patch_sha1[SHA_DIGEST_LENGTH];
if (ParseSha1(patch_sha1_str[i].c_str(), patch_sha1) == 0 &&
diff --git a/applypatch/include/applypatch/applypatch.h b/applypatch/include/applypatch/applypatch.h
index ca3dafbc9..4489decb6 100644
--- a/applypatch/include/applypatch/applypatch.h
+++ b/applypatch/include/applypatch/applypatch.h
@@ -63,9 +63,8 @@ int applypatch_flash(const char* source_filename, const char* target_filename,
int LoadFileContents(const char* filename, FileContents* file);
int SaveFileContents(const char* filename, const FileContents* file);
-int FindMatchingPatch(uint8_t* sha1, const std::vector<std::string>& patch_sha1_str);
-// bsdiff.cpp
+// bspatch.cpp
void ShowBSDiffLicense();
int ApplyBSDiffPatch(const unsigned char* old_data, ssize_t old_size,
const Value* patch, ssize_t patch_offset,