summaryrefslogtreecommitdiffstats
path: root/runtime/dex_file_verifier_test.cc
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 /runtime/dex_file_verifier_test.cc
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 'runtime/dex_file_verifier_test.cc')
-rw-r--r--runtime/dex_file_verifier_test.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/runtime/dex_file_verifier_test.cc b/runtime/dex_file_verifier_test.cc
index 00ca8a9..95a47cc 100644
--- a/runtime/dex_file_verifier_test.cc
+++ b/runtime/dex_file_verifier_test.cc
@@ -105,14 +105,14 @@ static std::unique_ptr<const DexFile> OpenDexFileBase64(const char* base64,
const char* location,
std::string* error_msg) {
// decode base64
- CHECK(base64 != NULL);
+ CHECK(base64 != nullptr);
size_t length;
std::unique_ptr<uint8_t[]> dex_bytes(DecodeBase64(base64, &length));
- CHECK(dex_bytes.get() != NULL);
+ CHECK(dex_bytes.get() != nullptr);
// write to provided file
std::unique_ptr<File> file(OS::CreateEmptyFile(location));
- CHECK(file.get() != NULL);
+ CHECK(file.get() != nullptr);
if (!file->WriteFully(dex_bytes.get(), length)) {
PLOG(FATAL) << "Failed to write base64 as dex file";
}
@@ -178,7 +178,7 @@ static std::unique_ptr<const DexFile> FixChecksumAndOpen(uint8_t* bytes, size_t
// write to provided file
std::unique_ptr<File> file(OS::CreateEmptyFile(location));
- CHECK(file.get() != NULL);
+ CHECK(file.get() != nullptr);
if (!file->WriteFully(bytes, length)) {
PLOG(FATAL) << "Failed to write base64 as dex file";
}
@@ -205,7 +205,7 @@ static bool ModifyAndLoad(const char* location, size_t offset, uint8_t new_val,
// Decode base64.
size_t length;
std::unique_ptr<uint8_t[]> dex_bytes(DecodeBase64(kGoodTestDex, &length));
- CHECK(dex_bytes.get() != NULL);
+ CHECK(dex_bytes.get() != nullptr);
// Make modifications.
dex_bytes.get()[offset] = new_val;