diff options
author | Yabin Cui <yabinc@google.com> | 2016-02-12 19:09:20 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-02-12 19:09:20 +0100 |
commit | 7f16c7a4c9b457302a0c91c9bd4c739708a9c79e (patch) | |
tree | 1794554fce15ba6e2e8d10a57598ccd0acbe523b /applypatch/applypatch.h | |
parent | Merge "Fix some memory leaks." (diff) | |
parent | applypatch: use vector to store data in FileContents. (diff) | |
download | android_bootable_recovery-7f16c7a4c9b457302a0c91c9bd4c739708a9c79e.tar android_bootable_recovery-7f16c7a4c9b457302a0c91c9bd4c739708a9c79e.tar.gz android_bootable_recovery-7f16c7a4c9b457302a0c91c9bd4c739708a9c79e.tar.bz2 android_bootable_recovery-7f16c7a4c9b457302a0c91c9bd4c739708a9c79e.tar.lz android_bootable_recovery-7f16c7a4c9b457302a0c91c9bd4c739708a9c79e.tar.xz android_bootable_recovery-7f16c7a4c9b457302a0c91c9bd4c739708a9c79e.tar.zst android_bootable_recovery-7f16c7a4c9b457302a0c91c9bd4c739708a9c79e.zip |
Diffstat (limited to '')
-rw-r--r-- | applypatch/applypatch.h | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/applypatch/applypatch.h b/applypatch/applypatch.h index 096596f03..9ee39d293 100644 --- a/applypatch/applypatch.h +++ b/applypatch/applypatch.h @@ -25,17 +25,11 @@ #include "openssl/sha.h" #include "edify/expr.h" -typedef struct _Patch { +struct FileContents { uint8_t sha1[SHA_DIGEST_LENGTH]; - const char* patch_filename; -} Patch; - -typedef struct _FileContents { - uint8_t sha1[SHA_DIGEST_LENGTH]; - unsigned char* data; - ssize_t size; + std::vector<unsigned char> data; struct stat st; -} FileContents; +}; // When there isn't enough room on the target filesystem to hold the // patched version of the file, we copy the original here and delete |