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>
David Barr committed
Jun 1, 2012 at 00:41 UTC
d8d8708bd6a56818ee3a85007e36a8ff201f9512
1 file changed
+1
-1
vcs-svn/svndump.c
+1
-1
@@ -361,7 +361,7 @@ void svndump_read(const char *url)
361
reset_rev_ctx(atoi(val));
362
break;
363
case sizeof("Node-path"):
364
- if (prefixcmp(t, "Node-"))
364
+ if (constcmp(t, "Node-"))
365
continue;
366
if (!constcmp(t + strlen("Node-"), "path")) {
367
if (active_ctx == NODE_CTX)