Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Unified Diff: delta_diff_generator.cc

Issue 2805027: AU: Changes for deltas on traditional bios machines. (Closed) Base URL: ssh://git@chromiumos-git/update_engine.git
Patch Set: fixes for review and merging in petkov's recent changes Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « action_processor_unittest.cc ('k') | delta_performer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: delta_diff_generator.cc
diff --git a/delta_diff_generator.cc b/delta_diff_generator.cc
index 23c5fc8d8a3a1f975b2a289190c4d17a44be5746..ec071193cecc67a7112d616241e3739650c356fa 100644
--- a/delta_diff_generator.cc
+++ b/delta_diff_generator.cc
@@ -27,6 +27,7 @@
#include "update_engine/utils.h"
using std::make_pair;
+using std::max;
using std::min;
using std::set;
using std::string;
@@ -756,7 +757,7 @@ bool DeltaDiffGenerator::GenerateDeltaUpdateFile(
TEST_AND_RETURN_FALSE(utils::FileSize(old_kernel_part) >= 0);
TEST_AND_RETURN_FALSE(utils::FileSize(new_kernel_part) >= 0);
- vector<Block> blocks(min(old_image_stbuf.st_size / kBlockSize,
+ vector<Block> blocks(max(old_image_stbuf.st_size / kBlockSize,
new_image_stbuf.st_size / kBlockSize));
LOG(INFO) << "invalid: " << Vertex::kInvalidIndex;
LOG(INFO) << "len: " << blocks.size();
« no previous file with comments | « action_processor_unittest.cc ('k') | delta_performer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698