[cfe-commits] r50715 - /cfe/trunk/lib/Analysis/CFRefCount.cpp
Ted Kremenek
kremenek at apple.com
Mon May 5 23:17:42 PDT 2008
Author: kremenek
Date: Tue May 6 01:17:42 2008
New Revision: 50715
URL: http://llvm.org/viewvc/llvm-project?rev=50715&view=rev
Log:
Use strncmp correctly.
Modified:
cfe/trunk/lib/Analysis/CFRefCount.cpp
Modified: cfe/trunk/lib/Analysis/CFRefCount.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/CFRefCount.cpp?rev=50715&r1=50714&r2=50715&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/CFRefCount.cpp (original)
+++ cfe/trunk/lib/Analysis/CFRefCount.cpp Tue May 6 01:17:42 2008
@@ -531,7 +531,7 @@
const char* s = S.getIdentifierInfoForSlot(0)->getName();
- if (!strncmp(s, "init", 4))
+ if (strncmp(s, "init", 4) == 0)
return getInitMethodSummary(S);
return 0;
@@ -624,7 +624,7 @@
unsigned len = strlen(cls);
// Prefix matches?
- if (strncmp(cls, s, len))
+ if (strncmp(cls, s, len) != 0)
return 0;
s += len;
@@ -636,7 +636,7 @@
if (s[0] == '\0')
break;
- if (!strncmp(s, "With", 4))
+ if (strncmp(s, "With", 4) == 0)
break;
return 0;
More information about the cfe-commits
mailing list