diff options
author | Brian Carlstrom <bdc@google.com> | 2013-07-19 11:24:49 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2013-07-19 11:24:49 -0700 |
commit | ebd66389dacec3118232fbd426c70dbed573cff1 (patch) | |
tree | 7270c0974e643accf3899f1c76813e78780ec603 /runtime | |
parent | ac43ae545ffca66aac813ed3e6ab54e3559b5e4e (diff) | |
parent | 4274889d48ef82369bf2c1ca70d84689b4f9e93a (diff) | |
download | art-ebd66389dacec3118232fbd426c70dbed573cff1.zip art-ebd66389dacec3118232fbd426c70dbed573cff1.tar.gz art-ebd66389dacec3118232fbd426c70dbed573cff1.tar.bz2 |
am 4274889d: Fixing cpplint readability/check issues
* commit '4274889d48ef82369bf2c1ca70d84689b4f9e93a':
Fixing cpplint readability/check issues
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/gc/accounting/space_bitmap_test.cc | 2 | ||||
-rw-r--r-- | runtime/gc/heap.cc | 2 | ||||
-rw-r--r-- | runtime/gc/space/dlmalloc_space.cc | 4 | ||||
-rw-r--r-- | runtime/gc/space/large_object_space.cc | 2 | ||||
-rw-r--r-- | runtime/jdwp/jdwp_adb.cc | 4 | ||||
-rw-r--r-- | runtime/jdwp/jdwp_socket.cc | 4 | ||||
-rw-r--r-- | runtime/oat/runtime/support_instrumentation.cc | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/runtime/gc/accounting/space_bitmap_test.cc b/runtime/gc/accounting/space_bitmap_test.cc index 806f301..e70704f 100644 --- a/runtime/gc/accounting/space_bitmap_test.cc +++ b/runtime/gc/accounting/space_bitmap_test.cc @@ -49,7 +49,7 @@ class BitmapVerify { void operator()(const mirror::Object* obj) { EXPECT_TRUE(obj >= begin_); EXPECT_TRUE(obj <= end_); - EXPECT_TRUE(bitmap_->Test(obj) == ((reinterpret_cast<uintptr_t>(obj) & 0xF) != 0)); + EXPECT_EQ(bitmap_->Test(obj), ((reinterpret_cast<uintptr_t>(obj) & 0xF) != 0)); } SpaceBitmap* bitmap_; diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 80a6205..942a4b1 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -214,7 +214,7 @@ Heap::Heap(size_t initial_size, size_t growth_limit, size_t min_free, size_t max mark_sweep_collectors_.push_back(new collector::StickyMarkSweep(this, concurrent)); } - CHECK(max_allowed_footprint_ != 0); + CHECK_NE(max_allowed_footprint_, 0U); if (VLOG_IS_ON(heap) || VLOG_IS_ON(startup)) { LOG(INFO) << "Heap() exiting"; } diff --git a/runtime/gc/space/dlmalloc_space.cc b/runtime/gc/space/dlmalloc_space.cc index 02acd28..9f85394 100644 --- a/runtime/gc/space/dlmalloc_space.cc +++ b/runtime/gc/space/dlmalloc_space.cc @@ -131,8 +131,8 @@ DlMallocSpace::DlMallocSpace(const std::string& name, MemMap* mem_map, void* msp size_t bitmap_index = bitmap_index_++; static const uintptr_t kGcCardSize = static_cast<uintptr_t>(accounting::CardTable::kCardSize); - CHECK(reinterpret_cast<uintptr_t>(mem_map->Begin()) % kGcCardSize == 0); - CHECK(reinterpret_cast<uintptr_t>(mem_map->End()) % kGcCardSize == 0); + CHECK_EQ(reinterpret_cast<uintptr_t>(mem_map->Begin()) % kGcCardSize, 0U); + CHECK_EQ(reinterpret_cast<uintptr_t>(mem_map->End()) % kGcCardSize, 0U); live_bitmap_.reset(accounting::SpaceBitmap::Create( StringPrintf("allocspace %s live-bitmap %d", name.c_str(), static_cast<int>(bitmap_index)), Begin(), Capacity())); diff --git a/runtime/gc/space/large_object_space.cc b/runtime/gc/space/large_object_space.cc index 6aedd9c..d7db561 100644 --- a/runtime/gc/space/large_object_space.cc +++ b/runtime/gc/space/large_object_space.cc @@ -125,7 +125,7 @@ bool LargeObjectMapSpace::Contains(const mirror::Object* obj) const { } FreeListSpace* FreeListSpace::Create(const std::string& name, byte* requested_begin, size_t size) { - CHECK(size % kAlignment == 0); + CHECK_EQ(size % kAlignment, 0U); MemMap* mem_map = MemMap::MapAnonymous(name.c_str(), requested_begin, size, PROT_READ | PROT_WRITE); CHECK(mem_map != NULL) << "Failed to allocate large object space mem map"; diff --git a/runtime/jdwp/jdwp_adb.cc b/runtime/jdwp/jdwp_adb.cc index 2bfe63e..cbf35be 100644 --- a/runtime/jdwp/jdwp_adb.cc +++ b/runtime/jdwp/jdwp_adb.cc @@ -297,7 +297,7 @@ bool JdwpAdbState::Accept() { bool JdwpAdbState::ProcessIncoming() { int readCount; - CHECK(clientSock != -1); + CHECK_NE(clientSock, -1); if (!HaveFullPacket()) { /* read some more, looping until we have data */ @@ -371,7 +371,7 @@ bool JdwpAdbState::ProcessIncoming() { LOG(INFO) << "Ignoring second debugger -- accepting and dropping"; close(sock); } else { - CHECK(control_sock_ == -1); + CHECK_EQ(control_sock_, -1); /* * Remote side most likely went away, so our next read * on clientSock will fail and throw us out of the loop. diff --git a/runtime/jdwp/jdwp_socket.cc b/runtime/jdwp/jdwp_socket.cc index 87706a4..3f5546e 100644 --- a/runtime/jdwp/jdwp_socket.cc +++ b/runtime/jdwp/jdwp_socket.cc @@ -218,7 +218,7 @@ bool JdwpSocketState::Accept() { return false; /* you're not listening! */ } - CHECK(clientSock == -1); /* must not already be talking */ + CHECK_EQ(clientSock, -1); /* must not already be talking */ addrlen = sizeof(addr); do { @@ -348,7 +348,7 @@ bool JdwpSocketState::Establish(const JdwpOptions* options) { bool JdwpSocketState::ProcessIncoming() { int readCount; - CHECK(clientSock != -1); + CHECK_NE(clientSock, -1); if (!HaveFullPacket()) { /* read some more, looping until we have data */ diff --git a/runtime/oat/runtime/support_instrumentation.cc b/runtime/oat/runtime/support_instrumentation.cc index 1f1b952..7ecd296 100644 --- a/runtime/oat/runtime/support_instrumentation.cc +++ b/runtime/oat/runtime/support_instrumentation.cc @@ -51,7 +51,7 @@ extern "C" uint64_t artInstrumentationMethodExitFromCode(Thread* self, mirror::A *sp = callee_save; uintptr_t* return_pc = reinterpret_cast<uintptr_t*>(reinterpret_cast<byte*>(sp) + callee_save->GetReturnPcOffsetInBytes()); - CHECK(*return_pc == 0); + CHECK_EQ(*return_pc, 0U); self->SetTopOfStack(sp, 0); self->VerifyStack(); instrumentation::Instrumentation* instrumentation = Runtime::Current()->GetInstrumentation(); |