diff options
author | Tao Bao <tbao@google.com> | 2017-11-10 11:49:53 -0800 |
---|---|---|
committer | Tao Bao <tbao@google.com> | 2017-11-10 12:18:34 -0800 |
commit | 1e0941f4f63d5ee56ad42aa3aa47eb6a8a155077 (patch) | |
tree | a714b2480c23e5b286c2806ef6ccc076461fabbe /applypatch/applypatch.cpp | |
parent | 992bccfef439d6dc1e62dd3ed6c3823a3c7a7f74 (diff) |
applypatch: Change the patch parameter to const Value& in Apply{BSDiff,Image}Patch.
It used to be "const Value*", but nullptr won't be a valid input.
Test: recovery_host_test; recovery_component_test
Change-Id: I904b5689ac3e64504088bf0544c9fb5d45a52243
Diffstat (limited to 'applypatch/applypatch.cpp')
-rw-r--r-- | applypatch/applypatch.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp index 2153b5f1..41a72eb1 100644 --- a/applypatch/applypatch.cpp +++ b/applypatch/applypatch.cpp @@ -651,11 +651,11 @@ static int GenerateTarget(const FileContents& source_file, const std::unique_ptr int result; if (use_bsdiff) { - result = ApplyBSDiffPatch(source_file.data.data(), source_file.data.size(), patch.get(), 0, - sink, &ctx); + result = + ApplyBSDiffPatch(source_file.data.data(), source_file.data.size(), *patch, 0, sink, &ctx); } else { - result = ApplyImagePatch(source_file.data.data(), source_file.data.size(), patch.get(), sink, - &ctx, bonus_data); + result = ApplyImagePatch(source_file.data.data(), source_file.data.size(), *patch, sink, &ctx, + bonus_data); } if (result != 0) { |