[analyzer] Malloc checker: remove unnecessary comparisons.

llvm-svn: 157081
This commit is contained in:
Anna Zaks 2012-05-18 22:47:40 +00:00
parent 14862c3141
commit b343660914
1 changed files with 10 additions and 16 deletions

View File

@ -339,21 +339,15 @@ public:
} // end anonymous namespace
void MallocChecker::initIdentifierInfo(ASTContext &Ctx) const {
if (!II_malloc)
if (II_malloc)
return;
II_malloc = &Ctx.Idents.get("malloc");
if (!II_free)
II_free = &Ctx.Idents.get("free");
if (!II_realloc)
II_realloc = &Ctx.Idents.get("realloc");
if (!II_reallocf)
II_reallocf = &Ctx.Idents.get("reallocf");
if (!II_calloc)
II_calloc = &Ctx.Idents.get("calloc");
if (!II_valloc)
II_valloc = &Ctx.Idents.get("valloc");
if (!II_strdup)
II_strdup = &Ctx.Idents.get("strdup");
if (!II_strndup)
II_strndup = &Ctx.Idents.get("strndup");
}