aboutsummaryrefslogtreecommitdiff
path: root/libio
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-29 14:38:27 -0700
committerDavid S. Miller <davem@davemloft.net>2012-03-29 14:38:27 -0700
commit20fde227388fb0c2857ff1793754056b833697fe (patch)
tree182b6e20e1d713ecd91332cf5c5d3a6ecee3269d /libio
parent984a42374ce2055836f580c2240306171757ea72 (diff)
downloadglibc-20fde227388fb0c2857ff1793754056b833697fe.zip
glibc-20fde227388fb0c2857ff1793754056b833697fe.tar.gz
glibc-20fde227388fb0c2857ff1793754056b833697fe.tar.bz2
Remove xsputn small copy optimization.
* libio/fileops.c (_IO_new_file_xsputn): Don't try to optimize small copies by hand.
Diffstat (limited to 'libio')
-rw-r--r--libio/fileops.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/libio/fileops.c b/libio/fileops.c
index 95e09b4..a2e8dac 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -1341,24 +1341,13 @@ _IO_new_file_xsputn (f, data, n)
{
if (count > to_do)
count = to_do;
- if (count > 20)
- {
#ifdef _LIBC
- f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
+ f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
#else
- memcpy (f->_IO_write_ptr, s, count);
- f->_IO_write_ptr += count;
+ memcpy (f->_IO_write_ptr, s, count);
+ f->_IO_write_ptr += count;
#endif
- s += count;
- }
- else
- {
- register char *p = f->_IO_write_ptr;
- register int i = (int) count;
- while (--i >= 0)
- *p++ = *s++;
- f->_IO_write_ptr = p;
- }
+ s += count;
to_do -= count;
}
if (to_do + must_flush > 0)