OSDN Git Service

Remove unreachable code from class_linker.cc
authorCalin Juravle <calin@google.com>
Fri, 5 Sep 2014 15:14:19 +0000 (16:14 +0100)
committerCalin Juravle <calin@google.com>
Fri, 5 Sep 2014 15:14:19 +0000 (16:14 +0100)
If the checksum doesn't match the oat_dex_file will be NULL, a case
which is handled in the first if.

Bug: 17402267

Change-Id: If8547ddc8fd7eff59a3b7dd36c07ac4ceb351361

runtime/class_linker.cc

index ad436d0..ca97b08 100644 (file)
@@ -1189,13 +1189,7 @@ bool ClassLinker::VerifyOatAndDexFileChecksums(const OatFile* oat_file,
     return false;
   }
 
-  if (dex_location_checksum != oat_dex_file->GetDexFileLocationChecksum()) {
-    *error_msg = StringPrintf("oat file '%s' mismatch (0x%x) with '%s' (0x%x)",
-                              oat_file->GetLocation().c_str(),
-                              oat_dex_file->GetDexFileLocationChecksum(),
-                              dex_location, dex_location_checksum);
-    return false;
-  }
+  DCHECK_EQ(dex_location_checksum, oat_dex_file->GetDexFileLocationChecksum());
   return true;
 }