Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(922)

Unified Diff: runtime/vm/parser.cc

Issue 11416094: Use the Equals method for C strings when comparing against C strings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 4c9027bcb0527501b2903b73db70eb6bab0c2d81..eb848bb1f42e0e8d0c24eda70946d26d2a9b1e18 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -6736,9 +6736,7 @@ String* Parser::ExpectIdentifier(const char* msg) {
bool Parser::IsLiteral(const char* literal) {
- const uint8_t* characters = reinterpret_cast<const uint8_t*>(literal);
- intptr_t len = strlen(literal);
- return IsIdentifier() && CurrentLiteral()->Equals(characters, len);
+ return IsIdentifier() && CurrentLiteral()->Equals(literal);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698