From 1e0941f4f63d5ee56ad42aa3aa47eb6a8a155077 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Fri, 10 Nov 2017 11:49:53 -0800 Subject: 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 --- applypatch/applypatch.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'applypatch/applypatch.cpp') diff --git a/applypatch/applypatch.cpp b/applypatch/applypatch.cpp index 2153b5f19..41a72eb15 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) { -- cgit v1.2.3