diff options
author | Tao Bao <tbao@google.com> | 2015-07-14 03:00:26 +0200 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-07-14 03:00:27 +0200 |
commit | 0bacbfd03c866b9078f86216e6786da91238ac91 (patch) | |
tree | 47a62ed3cf643578280ddb1982599ed8345dd071 /applypatch/bspatch.cpp | |
parent | Merge "Revert "Zero blocks before BLKDISCARD"" (diff) | |
parent | recovery: Switch applypatch/ and updater/ to cpp. (diff) | |
download | android_bootable_recovery-0bacbfd03c866b9078f86216e6786da91238ac91.tar android_bootable_recovery-0bacbfd03c866b9078f86216e6786da91238ac91.tar.gz android_bootable_recovery-0bacbfd03c866b9078f86216e6786da91238ac91.tar.bz2 android_bootable_recovery-0bacbfd03c866b9078f86216e6786da91238ac91.tar.lz android_bootable_recovery-0bacbfd03c866b9078f86216e6786da91238ac91.tar.xz android_bootable_recovery-0bacbfd03c866b9078f86216e6786da91238ac91.tar.zst android_bootable_recovery-0bacbfd03c866b9078f86216e6786da91238ac91.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; } |