mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-21 01:06:58 +00:00
test/bers: Fix sizeof to memset
sizeof(fd) is the size of the pointer. Make sure the entire array is set by using the number of elements times the size of the elements. Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com> Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
parent
e95b5c67ae
commit
d04eba411f
1 changed files with 1 additions and 1 deletions
|
|
@ -138,7 +138,7 @@ static int create_files(shared_data_t *shared, int *fd, size_t nr_files)
|
|||
char path[PATH_MAX];
|
||||
size_t i;
|
||||
|
||||
memset(fd, 0xff, sizeof(fd));
|
||||
memset(fd, 0xff, sizeof(*fd) * MAX_CHUNK);
|
||||
|
||||
pr_info("\tCreating %lu files\n", shared->opt_files);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue