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

Unified Diff: content/browser/download/save_file_manager.cc

Issue 1833723002: Initialize |bytes_so_far| local variable in SaveFileManager::SaveFinished. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/download/save_file_manager.cc
diff --git a/content/browser/download/save_file_manager.cc b/content/browser/download/save_file_manager.cc
index 0c7130e51c9e7645128323d0a32d0ee937c3cf7f..3d8940818734fda896d7c6099f6fc7424ef75b94 100644
--- a/content/browser/download/save_file_manager.cc
+++ b/content/browser/download/save_file_manager.cc
@@ -206,7 +206,7 @@ void SaveFileManager::SaveFinished(SaveItemId save_item_id,
<< " is_success = " << is_success;
DCHECK_CURRENTLY_ON(BrowserThread::FILE);
- int64_t bytes_so_far;
+ int64_t bytes_so_far = 0;
Łukasz Anforowicz 2016/03/24 18:23:28 I think 0 is safe fallback here. Initializing to
Randy Smith (Not in Mondays) 2016/03/24 19:17:49 I don't think a broader discussion is worth it. T
Łukasz Anforowicz 2016/03/24 19:25:58 Makes sense - done.
SaveFile* save_file = LookupSaveFile(save_item_id);
if (save_file != nullptr) {
DCHECK(save_file->InProgress());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698