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

Unified Diff: chrome_elf/blacklist/blacklist.cc

Issue 678193003: Fix two minor bugs found by /analyze (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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: chrome_elf/blacklist/blacklist.cc
diff --git a/chrome_elf/blacklist/blacklist.cc b/chrome_elf/blacklist/blacklist.cc
index 6d7860804b376faaf2df48f61277d067cba3015f..9915f6c91bb2c0cc3ae370e3acf1c6ebb24a2a61 100644
--- a/chrome_elf/blacklist/blacklist.cc
+++ b/chrome_elf/blacklist/blacklist.cc
@@ -158,7 +158,7 @@ bool LeaveSetupBeacon() {
reinterpret_cast<LPBYTE>(&blacklist_state),
&blacklist_state_size);
- if (blacklist_state == BLACKLIST_DISABLED || result != ERROR_SUCCESS ||
+ if (result != ERROR_SUCCESS || blacklist_state == BLACKLIST_DISABLED ||
type != REG_DWORD) {
::RegCloseKey(key);
return false;
@@ -227,7 +227,7 @@ bool IsBlacklistInitialized() {
}
int GetBlacklistIndex(const wchar_t* dll_name) {
- for (int i = 0; i < kTroublesomeDllsMaxCount, g_troublesome_dlls[i]; ++i) {
+ for (int i = 0; i < kTroublesomeDllsMaxCount && g_troublesome_dlls[i]; ++i) {
if (_wcsicmp(dll_name, g_troublesome_dlls[i]) == 0)
return i;
}
« 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