summaryrefslogtreecommitdiffstats
path: root/imgdiag
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2015-04-21 16:50:40 -0700
committerMathieu Chartier <mathieuc@google.com>2015-04-22 12:44:27 -0700
commit2cebb24bfc3247d3e9be138a3350106737455918 (patch)
treed04d27d21b3c7733d784e303f01f873bb99e7770 /imgdiag
parent1f02f1a7b3073b8fef07770a67fbf94afad317f0 (diff)
downloadart-2cebb24bfc3247d3e9be138a3350106737455918.zip
art-2cebb24bfc3247d3e9be138a3350106737455918.tar.gz
art-2cebb24bfc3247d3e9be138a3350106737455918.tar.bz2
Replace NULL with nullptr
Also fixed some lines that were too long, and a few other minor details. Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
Diffstat (limited to 'imgdiag')
-rw-r--r--imgdiag/imgdiag.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/imgdiag/imgdiag.cc b/imgdiag/imgdiag.cc
index 34a4c14..1056fe1 100644
--- a/imgdiag/imgdiag.cc
+++ b/imgdiag/imgdiag.cc
@@ -97,7 +97,8 @@ class ImgDiagDumper {
{
struct stat sts;
- std::string proc_pid_str = StringPrintf("/proc/%ld", static_cast<long>(image_diff_pid)); // NOLINT [runtime/int]
+ std::string proc_pid_str =
+ StringPrintf("/proc/%ld", static_cast<long>(image_diff_pid)); // NOLINT [runtime/int]
if (stat(proc_pid_str.c_str(), &sts) == -1) {
os << "Process does not exist";
return false;
@@ -144,7 +145,8 @@ class ImgDiagDumper {
const size_t pointer_size = InstructionSetPointerSize(
Runtime::Current()->GetInstructionSet());
- std::string file_name = StringPrintf("/proc/%ld/mem", static_cast<long>(image_diff_pid)); // NOLINT [runtime/int]
+ std::string file_name =
+ StringPrintf("/proc/%ld/mem", static_cast<long>(image_diff_pid)); // NOLINT [runtime/int]
size_t boot_map_size = boot_map.end - boot_map.start;
@@ -197,8 +199,8 @@ class ImgDiagDumper {
return false;
}
- std::string page_map_file_name = StringPrintf("/proc/%ld/pagemap",
- static_cast<long>(image_diff_pid)); // NOLINT [runtime/int]
+ std::string page_map_file_name = StringPrintf(
+ "/proc/%ld/pagemap", static_cast<long>(image_diff_pid)); // NOLINT [runtime/int]
auto page_map_file = std::unique_ptr<File>(OS::OpenFileForReading(page_map_file_name.c_str()));
if (page_map_file == nullptr) {
os << "Failed to open " << page_map_file_name << " for reading: " << strerror(errno);
@@ -226,8 +228,10 @@ class ImgDiagDumper {
return false;
}
- std::set<size_t> dirty_page_set_remote; // Set of the remote virtual page indices that are dirty
- std::set<size_t> dirty_page_set_local; // Set of the local virtual page indices that are dirty
+ // Set of the remote virtual page indices that are dirty
+ std::set<size_t> dirty_page_set_remote;
+ // Set of the local virtual page indices that are dirty
+ std::set<size_t> dirty_page_set_local;
size_t different_int32s = 0;
size_t different_bytes = 0;