diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2016-04-29 19:16:59 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2016-04-29 19:16:59 +0000 |
| commit | c94cceea9c2262c5b2ad5f215bb9a8ae48b02764 (patch) | |
| tree | dbb8174cbf6f1cc45b8de8031b18adb4030509a8 /subversion/libsvn_subr/eol.c | |
| parent | dc5d469d6574e9fb03bdd793658bb371315b306a (diff) | |
Diffstat (limited to 'subversion/libsvn_subr/eol.c')
| -rw-r--r-- | subversion/libsvn_subr/eol.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/subversion/libsvn_subr/eol.c b/subversion/libsvn_subr/eol.c index 417d90aaae46..e63cf1113577 100644 --- a/subversion/libsvn_subr/eol.c +++ b/subversion/libsvn_subr/eol.c @@ -33,20 +33,7 @@ char * svn_eol__find_eol_start(char *buf, apr_size_t len) { -#if !SVN_UNALIGNED_ACCESS_IS_OK - - /* On some systems, we need to make sure that BUF is properly aligned - * for chunky data access. This overhead is still justified because - * only lines tend to be tens of chars long. - */ - for (; (len > 0) && ((apr_uintptr_t)buf) & (sizeof(apr_uintptr_t)-1) - ; ++buf, --len) - { - if (*buf == '\n' || *buf == '\r') - return buf; - } - -#endif +#if SVN_UNALIGNED_ACCESS_IS_OK /* Scan the input one machine word at a time. */ for (; len > sizeof(apr_uintptr_t) @@ -71,6 +58,8 @@ svn_eol__find_eol_start(char *buf, apr_size_t len) break; } +#endif + /* The remaining odd bytes will be examined the naive way: */ for (; len > 0; ++buf, --len) { |
