summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/t-poll.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/t-poll.c b/tests/t-poll.c
index 5955d50..57cdb75 100644
--- a/tests/t-poll.c
+++ b/tests/t-poll.c
@@ -288,7 +288,9 @@ test_poll (void)
if (!ret)
{
assert (nwritten <= used);
- memmove (buffer, buffer + nwritten, nwritten);
+ /* Move the remaining data to the front of buffer. */
+ memmove (buffer, buffer + nwritten,
+ sizeof buffer - nwritten);
used -= nwritten;
}
ret = es_fflush (fds[1].stream);