From: David Barr Date: Tue, 14 Dec 2010 00:06:43 +0000 (+1100) Subject: vcs-svn: use strchr to find RFC822 delimiter X-Git-Tag: v1.7.5-rc0~3^2~8^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f1602054e3a45e195edf814681e8f5ba88851623;p=git.git vcs-svn: use strchr to find RFC822 delimiter This is a small optimisation (4% reduction in user time) but is the largest artifact within the parsing portion of svndump.c Signed-off-by: David Barr Signed-off-by: Jonathan Nieder --- diff --git a/vcs-svn/svndump.c b/vcs-svn/svndump.c index 77680a31e..0919a576d 100644 --- a/vcs-svn/svndump.c +++ b/vcs-svn/svndump.c @@ -297,10 +297,13 @@ void svndump_read(const char *url) reset_dump_ctx(pool_intern(url)); while ((t = buffer_read_line(&input))) { - val = strstr(t, ": "); + val = strchr(t, ':'); if (!val) continue; - val += 2; + val++; + if (*val != ' ') + continue; + val++; /* strlen(key) + 1 */ switch (val - t - 1) {