name-hash.c: replace cache_name_compare() with memcmp(3)

The same_name() private function wants a quick-and-exact check to see if they two names are byte-for-byte identical first and then fall back to the slow path. Use memcmp(3) for the former to make it clear that we do not want any "name" specific comparison. Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeremiah Mahler committed Jun 19, 2014 at 19:06 UTC be99ec97c8a1f94e723c6cc5331eff921ae49ed3
1 file changed +1 -1
name-hash.c
+1 -1
@@ -179,7 +179,7 @@ static int same_name(const struct cache_entry *ce, const char *name, int namelen
179 * Always do exact compare, even if we want a case-ignoring comparison;
180 * we do the quick exact one first, because it will be the common case.
181 */
182 - if (len == namelen && !cache_name_compare(name, namelen, ce->name, len))
182 + if (len == namelen && !memcmp(name, ce->name, len))
183 return 1;
184
185 if (!icase)