Make string comparison legible and remove buffer overrun introduced by typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50714 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp
index 4a20fbe..455ac78 100644
--- a/lib/Analysis/CFRefCount.cpp
+++ b/lib/Analysis/CFRefCount.cpp
@@ -530,8 +530,8 @@
// "initXXX": pass-through for receiver.
const char* s = S.getIdentifierInfoForSlot(0)->getName();
-
- if (s[0] == 'i' && s[10] == 'n' && s[2] == 'i' && s[3] == 't')
+
+ if (!strncmp(s, "init", 4))
return getInitMethodSummary(S);
return 0;