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

Unified Diff: minidump/minidump_simple_string_dictionary_writer.cc

Issue 678473003: minidump: Be consistent about setting the fields of WritableIoVec (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@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 | « minidump/minidump_module_writer.cc ('k') | minidump/minidump_thread_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: minidump/minidump_simple_string_dictionary_writer.cc
diff --git a/minidump/minidump_simple_string_dictionary_writer.cc b/minidump/minidump_simple_string_dictionary_writer.cc
index d9a5c919f1e3f985a001ebc9d2a6036fc06d455d..0b47cf8bddb6df3006985bc47c5b4b673cd4ad58 100644
--- a/minidump/minidump_simple_string_dictionary_writer.cc
+++ b/minidump/minidump_simple_string_dictionary_writer.cc
@@ -144,12 +144,10 @@ bool MinidumpSimpleStringDictionaryWriter::WriteObject(
iov.iov_len = sizeof(simple_string_dictionary_base_);
std::vector<WritableIoVec> iovecs(1, iov);
- if (!entries_.empty()) {
+ for (const auto& key_entry : entries_) {
+ iov.iov_base = key_entry.second->MinidumpSimpleStringDictionaryEntry();
iov.iov_len = sizeof(MinidumpSimpleStringDictionaryEntry);
- for (const auto& key_entry : entries_) {
- iov.iov_base = key_entry.second->MinidumpSimpleStringDictionaryEntry();
- iovecs.push_back(iov);
- }
+ iovecs.push_back(iov);
}
return file_writer->WriteIoVec(&iovecs);
« no previous file with comments | « minidump/minidump_module_writer.cc ('k') | minidump/minidump_thread_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698