From: David Barr Date: Thu, 31 May 2012 14:41:27 +0000 (+1000) Subject: vcs-svn: use constcmp instead of prefixcmp X-Git-Tag: v1.7.12-rc0~41^2~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8d8708bd6a56818ee3a85007e36a8ff201f9512;p=git.git vcs-svn: use constcmp instead of prefixcmp Since the length of t is already known, we can simplify a little by using memcmp() instead of strncmp() to carry out a prefix comparison. All nearby code already does this. Noticed in the standalone svn-dump-fast-export project which has not needed to implement prefixcmp() yet. Signed-off-by: David Barr Signed-off-by: Jonathan Nieder --- diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c index f6c0d4c8a..c5d07a668 100644 --- a/vcs-svn/svndump.c +++ b/vcs-svn/svndump.c @@ -361,7 +361,7 @@ void svndump_read(const char *url) reset_rev_ctx(atoi(val)); break; case sizeof("Node-path"): - if (prefixcmp(t, "Node-")) + if (constcmp(t, "Node-")) continue; if (!constcmp(t + strlen("Node-"), "path")) { if (active_ctx == NODE_CTX)