summaryrefslogtreecommitdiffstats
path: root/applypatch/bspatch.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-06-24 08:23:33 +0200
committerTao Bao <tbao@google.com>2015-07-14 08:25:46 +0200
commit485b63702c312bf47a1fd4821fde7dcade41e09d (patch)
tree57d13940b2ca1bef9834f236323079dd1fbad7d5 /applypatch/bspatch.cpp
parentam a91335ae: am 90c75b0b: Change init sequence to support file level encryption (diff)
downloadandroid_bootable_recovery-485b63702c312bf47a1fd4821fde7dcade41e09d.tar
android_bootable_recovery-485b63702c312bf47a1fd4821fde7dcade41e09d.tar.gz
android_bootable_recovery-485b63702c312bf47a1fd4821fde7dcade41e09d.tar.bz2
android_bootable_recovery-485b63702c312bf47a1fd4821fde7dcade41e09d.tar.lz
android_bootable_recovery-485b63702c312bf47a1fd4821fde7dcade41e09d.tar.xz
android_bootable_recovery-485b63702c312bf47a1fd4821fde7dcade41e09d.tar.zst
android_bootable_recovery-485b63702c312bf47a1fd4821fde7dcade41e09d.zip
Diffstat (limited to '')
-rw-r--r--applypatch/bspatch.cpp (renamed from applypatch/bspatch.c)5
1 files changed, 2 insertions, 3 deletions
diff --git a/applypatch/bspatch.c b/applypatch/bspatch.cpp
index b57760eda..9d201b477 100644
--- a/applypatch/bspatch.c
+++ b/applypatch/bspatch.cpp
@@ -182,10 +182,9 @@ int ApplyBSDiffPatchMem(const unsigned char* old_data, ssize_t old_size,
printf("failed to bzinit extra stream (%d)\n", bzerr);
}
- *new_data = malloc(*new_size);
+ *new_data = reinterpret_cast<unsigned char*>(malloc(*new_size));
if (*new_data == NULL) {
- printf("failed to allocate %ld bytes of memory for output file\n",
- (long)*new_size);
+ printf("failed to allocate %zd bytes of memory for output file\n", *new_size);
return 1;
}