summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2012-02-28 21:07:30 +0100
committerDoug Zongker <dougz@android.com>2012-02-28 21:07:30 +0100
commitb07b293944c2002a39bbd804f0b6f590ed8458cd (patch)
tree45aea334fdfc1217d386891a4a795272907614c2
parentfix failure to free memory (diff)
downloadandroid_bootable_recovery-b07b293944c2002a39bbd804f0b6f590ed8458cd.tar
android_bootable_recovery-b07b293944c2002a39bbd804f0b6f590ed8458cd.tar.gz
android_bootable_recovery-b07b293944c2002a39bbd804f0b6f590ed8458cd.tar.bz2
android_bootable_recovery-b07b293944c2002a39bbd804f0b6f590ed8458cd.tar.lz
android_bootable_recovery-b07b293944c2002a39bbd804f0b6f590ed8458cd.tar.xz
android_bootable_recovery-b07b293944c2002a39bbd804f0b6f590ed8458cd.tar.zst
android_bootable_recovery-b07b293944c2002a39bbd804f0b6f590ed8458cd.zip
-rw-r--r--applypatch/applypatch.c2
-rw-r--r--applypatch/applypatch.h2
-rw-r--r--minelf/Retouch.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c
index 09ca2ad90..00004e9a8 100644
--- a/applypatch/applypatch.c
+++ b/applypatch/applypatch.c
@@ -472,7 +472,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, char** const patch_sha1_str,
+int FindMatchingPatch(uint8_t* sha1, const char** patch_sha1_str,
int num_patches) {
int i;
uint8_t patch_sha1[SHA_DIGEST_SIZE];
diff --git a/applypatch/applypatch.h b/applypatch/applypatch.h
index e8ac3cc6d..fb58843ba 100644
--- a/applypatch/applypatch.h
+++ b/applypatch/applypatch.h
@@ -64,7 +64,7 @@ int LoadFileContents(const char* filename, FileContents* file,
int retouch_flag);
int SaveFileContents(const char* filename, const FileContents* file);
void FreeFileContents(FileContents* file);
-int FindMatchingPatch(uint8_t* sha1, char** const patch_sha1_str,
+int FindMatchingPatch(uint8_t* sha1, const char** patch_sha1_str,
int num_patches);
// bsdiff.c
diff --git a/minelf/Retouch.c b/minelf/Retouch.c
index 33809cd6d..a25380b34 100644
--- a/minelf/Retouch.c
+++ b/minelf/Retouch.c
@@ -345,7 +345,7 @@ bool retouch_one_library(const char *binary_name,
success = false;
goto out;
}
- if (SaveFileContents(CACHE_TEMP_SOURCE, file) < 0) {
+ if (SaveFileContents(CACHE_TEMP_SOURCE, &file) < 0) {
printf("Failed to back up source file.\n");
success = false;
goto out;
@@ -357,7 +357,7 @@ bool retouch_one_library(const char *binary_name,
printf("(now %ld bytes free for target)\n", (long)free_space);
}
- result = SaveFileContents(binary_name_atomic, file);
+ result = SaveFileContents(binary_name_atomic, &file);
if (result != 0) {
// Maybe the filesystem was optimistic: retry.
enough_space = false;