summaryrefslogtreecommitdiff
path: root/vcs-svn
diff options
context:
space:
mode:
authorDavid Barr <davidbarr@google.com>2012-05-31 14:41:28 (GMT)
committerJonathan Nieder <jrnieder@gmail.com>2012-07-06 04:26:52 (GMT)
commit53153e8382966e35362d072ba17ba5887e3c0851 (patch)
tree254c434968a55265d12512b52a258b6d90b8046d /vcs-svn
parentd8d8708bd6a56818ee3a85007e36a8ff201f9512 (diff)
downloadgit-53153e8382966e35362d072ba17ba5887e3c0851.zip
git-53153e8382966e35362d072ba17ba5887e3c0851.tar.gz
git-53153e8382966e35362d072ba17ba5887e3c0851.tar.bz2
vcs-svn: use strstr instead of memmem
memmem is a GNU extension. Avoiding it makes the code clearer and makes it easier for projects that don't share git's compat/ code, such as the standalone svn-dump-fast-export project, to reuse the vcs-svn/ library. Signed-off-by: David Barr <davidbarr@google.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Diffstat (limited to 'vcs-svn')
-rw-r--r--vcs-svn/fast_export.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcs-svn/fast_export.c b/vcs-svn/fast_export.c
index b4be91c..854b328 100644
--- a/vcs-svn/fast_export.c
+++ b/vcs-svn/fast_export.c
@@ -158,7 +158,7 @@ static int parse_cat_response_line(const char *header, off_t *len)
if (ends_with(header, headerlen, " missing"))
return error("cat-blob reports missing blob: %s", header);
- type = memmem(header, headerlen, " blob ", strlen(" blob "));
+ type = strstr(header, " blob ");
if (!type)
return error("cat-blob header has wrong object type: %s", header);
n = strtoumax(type + strlen(" blob "), (char **) &end, 10);