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

Unified Diff: chrome/installer/util/lzma_util.cc

Issue 151101: Fixit: Remove bunch of coverity warnings from chrome/installer/*. (Closed)
Patch Set: Created 11 years, 6 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 | « chrome/installer/util/l10n_string_util.cc ('k') | chrome/installer/util/set_reg_value_work_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/lzma_util.cc
diff --git a/chrome/installer/util/lzma_util.cc b/chrome/installer/util/lzma_util.cc
index 3e931ceaf6a8b53ea06dec08079fe587d957a859..cc8569d42913f79f41e614b7de2fdfb60009ae1b 100644
--- a/chrome/installer/util/lzma_util.cc
+++ b/chrome/installer/util/lzma_util.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -149,9 +149,9 @@ DWORD LzmaUtil::UnPack(const std::wstring& location) {
break;
}
- WriteFile(hFile, outBuffer + offset, (DWORD) outSizeProcessed,
- &written, NULL);
- if (written != outSizeProcessed) {
+ if ((!WriteFile(hFile, outBuffer + offset, (DWORD) outSizeProcessed,
+ &written, NULL)) ||
+ (written != outSizeProcessed)) {
ret = GetLastError();
CloseHandle(hFile);
break;
« no previous file with comments | « chrome/installer/util/l10n_string_util.cc ('k') | chrome/installer/util/set_reg_value_work_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698