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:
Rikard Falkeborn 2019-04-28 20:22:55 +02:00 committed by Andrei Vagin
parent e95b5c67ae
commit d04eba411f

View file

@ -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);