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

Unified Diff: src/platform/update_engine/split_file_writer.cc

Issue 1694025: AU: Update Downloader to support our image formats. (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 8 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 | « src/platform/update_engine/install_plan.h ('k') | src/platform/update_engine/test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/split_file_writer.cc
diff --git a/src/platform/update_engine/split_file_writer.cc b/src/platform/update_engine/split_file_writer.cc
index e86894754b35f85a3ebec4d80bc41414db685dcc..690d4e3f02024771b51e7809e1d9989b21c99898 100644
--- a/src/platform/update_engine/split_file_writer.cc
+++ b/src/platform/update_engine/split_file_writer.cc
@@ -49,8 +49,9 @@ ssize_t SplitFileWriter::Write(const void* bytes, size_t count) {
// to the first FileWriter.
if (bytes_received_ < static_cast<off_t>(sizeof(uint64_t))) {
// Write more to the initial buffer
- size_t bytes_to_copy = min(count,
- sizeof(first_length_buf_) - bytes_received_);
+ size_t bytes_to_copy = min(static_cast<off_t>(count),
+ static_cast<off_t>(sizeof(first_length_buf_)) -
+ bytes_received_);
memcpy(&first_length_buf_[bytes_received_], bytes, bytes_to_copy);
bytes_received_ += bytes_to_copy;
count -= bytes_to_copy;
« no previous file with comments | « src/platform/update_engine/install_plan.h ('k') | src/platform/update_engine/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698