summaryrefslogtreecommitdiffstats
path: root/lib/waiter
diff options
context:
space:
mode:
Diffstat (limited to 'lib/waiter')
-rw-r--r--lib/waiter/waiter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/waiter/waiter.c b/lib/waiter/waiter.c
index 214dfda..68f483a 100644
--- a/lib/waiter/waiter.c
+++ b/lib/waiter/waiter.c
@@ -43,7 +43,8 @@ void waiter_remove(struct waiter *waiter)
assert(i >= 0 && i < n_waiters);
n_waiters--;
- memmove(&waiters[i], &waiters[i+1], n_waiters - i);
+ memmove(&waiters[i], &waiters[i+1],
+ (n_waiters - i) * sizeof(waiters[0]));
waiters = talloc_realloc(NULL, waiters, struct waiter, n_waiters);
}
OpenPOWER on IntegriCloud