summary refs log tree commit diff
path: root/sysdeps/posix/writev.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/posix/writev.c')
-rw-r--r--sysdeps/posix/writev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sysdeps/posix/writev.c b/sysdeps/posix/writev.c
index f6f685ce7a..ae38fefef3 100644
--- a/sysdeps/posix/writev.c
+++ b/sysdeps/posix/writev.c
@@ -53,11 +53,10 @@ __writev (fd, vector, count)
 #define	min(a, b)	((a) > (b) ? (b) : (a))
       size_t copy = min (vector[i].iov_len, to_copy);
 
-      (void) memcpy ((void *) bp, (void *) vector[i].iov_base, copy);
+      bp = __mempcpy ((void *) bp, (void *) vector[i].iov_base, copy);
 
-      bp += copy;
       to_copy -= copy;
-      if (bytes == 0)
+      if (to_copy == 0)
 	break;
     }