Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRikard Falkeborn <rikard.falkeborn@gmail.com>2019-04-28 21:22:55 +0300
committerAndrei Vagin <avagin@gmail.com>2019-09-07 15:59:49 +0300
commitd04eba411f0740d93649371605ab0ab9e9abdfb3 (patch)
tree9d7b9162ebac03a6ca6941b113ab92f1044c831e /test
parente95b5c67ae74759c9d08dc5465b032a7e391c3b1 (diff)
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>
Diffstat (limited to 'test')
-rw-r--r--test/others/bers/bers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/others/bers/bers.c b/test/others/bers/bers.c
index 0954868ff..90b70c349 100644
--- a/test/others/bers/bers.c
+++ b/test/others/bers/bers.c
@@ -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);