summaryrefslogtreecommitdiffstats
path: root/tools/applypatch/bsdiff.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/applypatch/bsdiff.c')
-rw-r--r--tools/applypatch/bsdiff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/applypatch/bsdiff.c b/tools/applypatch/bsdiff.c
index 9d55f3b..d5cd617 100644
--- a/tools/applypatch/bsdiff.c
+++ b/tools/applypatch/bsdiff.c
@@ -84,7 +84,7 @@ static off_t offtin(u_char *buf)
int ApplyBSDiffPatch(const unsigned char* old_data, ssize_t old_size,
const char* patch_filename, ssize_t patch_offset,
- FILE* output, SHA_CTX* ctx) {
+ SinkFn sink, void* token, SHA_CTX* ctx) {
unsigned char* new_data;
ssize_t new_size;
@@ -93,7 +93,7 @@ int ApplyBSDiffPatch(const unsigned char* old_data, ssize_t old_size,
return -1;
}
- if (fwrite(new_data, 1, new_size, output) < new_size) {
+ if (sink(new_data, new_size, token) < new_size) {
fprintf(stderr, "short write of output: %d (%s)\n", errno, strerror(errno));
return 1;
}