summaryrefslogtreecommitdiffstats
path: root/applypatch/applypatch.c
diff options
context:
space:
mode:
authorDoug Zongker <dougz@google.com>2014-08-15 23:31:52 +0200
committerDoug Zongker <dougz@google.com>2014-08-19 22:40:15 +0200
commit66f5ce387af87584b40eeec774429d7ead28b7cc (patch)
tree225eaa2234f683328b9055cd823017d8f748d9eb /applypatch/applypatch.c
parentam 1a35a586: revert uncrypt back to dynamic linking, fix libs (diff)
downloadandroid_bootable_recovery-66f5ce387af87584b40eeec774429d7ead28b7cc.tar
android_bootable_recovery-66f5ce387af87584b40eeec774429d7ead28b7cc.tar.gz
android_bootable_recovery-66f5ce387af87584b40eeec774429d7ead28b7cc.tar.bz2
android_bootable_recovery-66f5ce387af87584b40eeec774429d7ead28b7cc.tar.lz
android_bootable_recovery-66f5ce387af87584b40eeec774429d7ead28b7cc.tar.xz
android_bootable_recovery-66f5ce387af87584b40eeec774429d7ead28b7cc.tar.zst
android_bootable_recovery-66f5ce387af87584b40eeec774429d7ead28b7cc.zip
Diffstat (limited to '')
-rw-r--r--applypatch/applypatch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/applypatch/applypatch.c b/applypatch/applypatch.c
index 60e9e4a5c..bfb9440e4 100644
--- a/applypatch/applypatch.c
+++ b/applypatch/applypatch.c
@@ -32,7 +32,7 @@
#include "edify/expr.h"
static int LoadPartitionContents(const char* filename, FileContents* file);
-static ssize_t FileSink(unsigned char* data, ssize_t len, void* token);
+static ssize_t FileSink(const unsigned char* data, ssize_t len, void* token);
static int GenerateTarget(FileContents* source_file,
const Value* source_patch_value,
FileContents* copy_file,
@@ -599,7 +599,7 @@ int ShowLicenses() {
return 0;
}
-ssize_t FileSink(unsigned char* data, ssize_t len, void* token) {
+ssize_t FileSink(const unsigned char* data, ssize_t len, void* token) {
int fd = *(int *)token;
ssize_t done = 0;
ssize_t wrote;
@@ -620,7 +620,7 @@ typedef struct {
ssize_t pos;
} MemorySinkInfo;
-ssize_t MemorySink(unsigned char* data, ssize_t len, void* token) {
+ssize_t MemorySink(const unsigned char* data, ssize_t len, void* token) {
MemorySinkInfo* msi = (MemorySinkInfo*)token;
if (msi->size - msi->pos < len) {
return -1;