diff options
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; } |