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 | 5f478e9a0aba4e79e28275d7ff9479feda700b92 (patch) | |
tree | b6b7e2c0652e571b7e78300fffc6ad308b387a70 /clang/lib/Analysis/CFRefCount.cpp | |
parent | 7ffc3c9a954ccd4a74aced52405d674db2a816b7 (diff) | |
download | bcm5719-llvm-5f478e9a0aba4e79e28275d7ff9479feda700b92.tar.gz bcm5719-llvm-5f478e9a0aba4e79e28275d7ff9479feda700b92.zip |
Make string comparison legible and remove buffer overrun introduced by typo.
llvm-svn: 50714
Diffstat (limited to 'clang/lib/Analysis/CFRefCount.cpp')
-rw-r--r-- | clang/lib/Analysis/CFRefCount.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Analysis/CFRefCount.cpp b/clang/lib/Analysis/CFRefCount.cpp index 4a20fbec87f..455ac78be27 100644 --- a/clang/lib/Analysis/CFRefCount.cpp +++ b/clang/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; |