Commit 3135d7d1 authored by Calder Kitagawa's avatar Calder Kitagawa Committed by Commit Bot

[Zucchini]: Cleanup some issues found when merging to trunk.

A few simple changes/typos that require correction which were detected
when merging changes into trunk.

Change-Id: Ib088ca4a1741e642e3d912d010e4e77ba5fb72b0
Reviewed-on: https://chromium-review.googlesource.com/962357
Commit-Queue: Calder Kitagawa <ckitagawa@google.com>
Reviewed-by: default avatarSamuel Huang <huangs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543155}
parent 917bc057
...@@ -144,7 +144,7 @@ zucchini::status::Code MainMatch(MainParams params) { ...@@ -144,7 +144,7 @@ zucchini::status::Code MainMatch(MainParams params) {
} }
File new_file(params.file_paths[1], File::FLAG_OPEN | File::FLAG_READ); File new_file(params.file_paths[1], File::FLAG_OPEN | File::FLAG_READ);
zucchini::MappedFileReader new_image(std::move(new_file)); zucchini::MappedFileReader new_image(std::move(new_file));
if (old_image.HasError()) { if (new_image.HasError()) {
LOG(ERROR) << "Error with file " << params.file_paths[1].value() << ": " LOG(ERROR) << "Error with file " << params.file_paths[1].value() << ": "
<< new_image.error(); << new_image.error();
return zucchini::status::kStatusFileReadError; return zucchini::status::kStatusFileReadError;
......
...@@ -17,8 +17,7 @@ namespace { ...@@ -17,8 +17,7 @@ namespace {
struct FileNames { struct FileNames {
FileNames() : is_dummy(true) { FileNames() : is_dummy(true) {
// Use fake names. If |is_dummy| is true these files are only used for error // Use fake names.
// output.
old_name = old_name.AppendASCII("old_name"); old_name = old_name.AppendASCII("old_name");
patch_name = patch_name.AppendASCII("patch_name"); patch_name = patch_name.AppendASCII("patch_name");
new_name = new_name.AppendASCII("new_name"); new_name = new_name.AppendASCII("new_name");
...@@ -35,6 +34,8 @@ struct FileNames { ...@@ -35,6 +34,8 @@ struct FileNames {
base::FilePath old_name; base::FilePath old_name;
base::FilePath patch_name; base::FilePath patch_name;
base::FilePath new_name; base::FilePath new_name;
// A flag to decide whether the filenames are only for error output.
const bool is_dummy; const bool is_dummy;
}; };
...@@ -97,10 +98,10 @@ status::Code ApplyCommon(base::File&& old_file_handle, ...@@ -97,10 +98,10 @@ status::Code ApplyCommon(base::File&& old_file_handle,
} // namespace } // namespace
status::Code Apply(base::File old_file_handle, status::Code Apply(base::File&& old_file_handle,
base::File patch_file_handle, base::File&& patch_file_handle,
base::File new_file_handle) { base::File&& new_file_handle) {
const FileNames file_names = FileNames(); const FileNames file_names;
return ApplyCommon(std::move(old_file_handle), std::move(patch_file_handle), return ApplyCommon(std::move(old_file_handle), std::move(patch_file_handle),
std::move(new_file_handle), file_names); std::move(new_file_handle), file_names);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment