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

Unified Diff: base/process_util_posix.cc

Issue 1432003: Minor C++ fixes found by Clang. (Closed)
Patch Set: rebase Created 10 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 | base/tuple_unittest.cc » ('j') | base/tuple_unittest.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_posix.cc
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index 25428fd027b4f6e5ab8183bd4195f22412dc546b..ec5f06c97b052646b8efe824dbe2102a0630d9d0 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -221,12 +221,12 @@ void CloseSuperfluousFds(const base::InjectiveMultimap& saved_mapping) {
const int fd = static_cast<int>(i);
if (fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO)
continue;
- InjectiveMultimap::const_iterator i;
- for (i = saved_mapping.begin(); i != saved_mapping.end(); i++) {
- if (fd == i->dest)
+ InjectiveMultimap::const_iterator j;
+ for (j = saved_mapping.begin(); j != saved_mapping.end(); j++) {
+ if (fd == j->dest)
break;
}
- if (i != saved_mapping.end())
+ if (j != saved_mapping.end())
continue;
// Since we're just trying to close anything we can find,
« no previous file with comments | « no previous file | base/tuple_unittest.cc » ('j') | base/tuple_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698