From 8b0b0f1f02f7990177e0da89eb471da2ced13f4c Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Thu, 19 Apr 2018 21:02:13 -0700 Subject: applypatch: Drop the SHA_CTX parameter in Apply{BSDiff,Image}Patch. As they're accepting the SinkFn callback, it makes more sense to leave the work to their callers. Test: mmma -j bootable/recovery Test: Run recovery_component_test on marlin. Test: No other active user of the two functions. Change-Id: I8d67b38ce037925442296f136b483e0c71983777 --- updater/blockimg.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'updater/blockimg.cpp') diff --git a/updater/blockimg.cpp b/updater/blockimg.cpp index e93196b27..e72ddd313 100644 --- a/updater/blockimg.cpp +++ b/updater/blockimg.cpp @@ -1429,7 +1429,7 @@ static int PerformCommandDiff(CommandParameters& params) { if (ApplyImagePatch(params.buffer.data(), blocks * BLOCKSIZE, patch_value, std::bind(&RangeSinkWriter::Write, &writer, std::placeholders::_1, std::placeholders::_2), - nullptr, nullptr) != 0) { + nullptr) != 0) { LOG(ERROR) << "Failed to apply image patch."; failure_type = kPatchApplicationFailure; return -1; @@ -1437,8 +1437,7 @@ static int PerformCommandDiff(CommandParameters& params) { } else { if (ApplyBSDiffPatch(params.buffer.data(), blocks * BLOCKSIZE, patch_value, 0, std::bind(&RangeSinkWriter::Write, &writer, std::placeholders::_1, - std::placeholders::_2), - nullptr) != 0) { + std::placeholders::_2)) != 0) { LOG(ERROR) << "Failed to apply bsdiff patch."; failure_type = kPatchApplicationFailure; return -1; -- cgit v1.2.3