pretty: use prefixcmp instead of memcmp on NUL-terminated strings
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Mon, 14 Jan 2013 16:34:56 +0000 (17:34 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 14 Jan 2013 17:59:27 +0000 (09:59 -0800)
commit8a692d277795e426167d76d652cf86656c9c162e
tree4562e0ed76daf30280fdd72b2c39f52d6226dbdc
parent30825178fb72e3664bd1bda7c02c62e300e2e5ce
pretty: use prefixcmp instead of memcmp on NUL-terminated strings

This conversion avoids the need for magic string length numbers in the
code.  And unlike memcmp(), prefixcmp() is careful to not run over the
end of a string.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c