diff options
author | Geoff Levand <geoffrey.levand@am.sony.com> | 2009-04-12 15:11:37 +0000 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2009-06-30 15:28:55 +0800 |
commit | e058e90117300125af7b6e93eb0e5aeb23543af9 (patch) | |
tree | bce5275dfd1ac92a7b3da8875ba876f1d6dadcff /lib | |
parent | ea45e832b0d3e4a6e8c63f6a1c4741795b0b33dd (diff) | |
download | talos-petitboot-e058e90117300125af7b6e93eb0e5aeb23543af9.tar.gz talos-petitboot-e058e90117300125af7b6e93eb0e5aeb23543af9.zip |
Fix memmove size
Correct the byte count for several memmove calls.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/waiter/waiter.c | 3 |
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); } |