Index: runtime/bin/dfe.cc |
diff --git a/runtime/bin/dfe.cc b/runtime/bin/dfe.cc |
index bc83f5be15b0d359463df83e3aba4a39cb96850b..54e30494cd92ebeb84a6d234846814e7eec8a9b2 100644 |
--- a/runtime/bin/dfe.cc |
+++ b/runtime/bin/dfe.cc |
@@ -143,10 +143,7 @@ bool DFE::TryReadKernelFile(const char* script_uri, |
DartUtils::ReadFile(&buffer, kernel_ir_size, script_file); |
DartUtils::CloseFile(script_file); |
if (*kernel_ir_size > 0 && buffer != NULL) { |
- // We need a temporary variable because SniffForMagicNumber modifies the |
- // buffer pointer to skip snapshot magic number. |
- const uint8_t* temp = buffer; |
- if (DartUtils::SniffForMagicNumber(&temp, kernel_ir_size) != |
+ if (DartUtils::SniffForMagicNumber(buffer, *kernel_ir_size) != |
DartUtils::kKernelMagicNumber) { |
free(const_cast<uint8_t*>(buffer)); |
*kernel_ir = NULL; |