summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barr <davidbarr@google.com>2012-05-31 14:41:27 (GMT)
committerJonathan Nieder <jrnieder@gmail.com>2012-07-06 04:26:52 (GMT)
commitd8d8708bd6a56818ee3a85007e36a8ff201f9512 (patch)
treefe59fee35148e9ff28e3d6f3eab6d948aacce31e
parent4a1613194af218afb99be0e14af449e86852d06e (diff)
downloadgit-d8d8708bd6a56818ee3a85007e36a8ff201f9512.zip
git-d8d8708bd6a56818ee3a85007e36a8ff201f9512.tar.gz
git-d8d8708bd6a56818ee3a85007e36a8ff201f9512.tar.bz2
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 <davidbarr@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
-rw-r--r--vcs-svn/svndump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c
index f6c0d4c..c5d07a6 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)