fix useless comparison #6355

This commit is contained in:
Benjamin Peterson 2009-06-28 16:23:55 +00:00
parent b1715f131f
commit 3e791903ce
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ name_matches(const char *name1, const char *name2) {
/* if either is NULL, */
if (!name1 || !name2) {
/* they're only the same if they're both NULL. */
return name2 == name2;
return name1 == name2;
}
return !strcmp(name1, name2);
}