diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-05-06 06:09:09 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-05-06 06:09:09 +0000 |
commit | aee9e57ced42af2035833c872a0ee65f12a2b8c7 (patch) | |
tree | ece77553c1384be0753b94217b9b9e811d1ea351 /lib/Analysis/CFRefCount.cpp | |
parent | 70f9d8652b34967b2c356f4edf0a701094a5d2d3 (diff) |
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
Diffstat (limited to 'lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | lib/Analysis/CFRefCount.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Analysis/CFRefCount.cpp b/lib/Analysis/CFRefCount.cpp index 4a20fbec87..455ac78be2 100644 --- a/lib/Analysis/CFRefCount.cpp +++ b/lib/Analysis/CFRefCount.cpp @@ -530,8 +530,8 @@ RetainSummary* RetainSummaryManager::getMethodSummary(Selector S) { // "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; |