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>
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);
}
/* remove the device from the client's device array */
client->n_devices--;
memmove(&client->devices[i], &client->devices[i+1],
- client->n_devices - i);
+ (client->n_devices - i) * sizeof(client->devices[0]));
client->devices = talloc_realloc(client, client->devices,
struct device *, client->n_devices);