X-Git-Url: http://git.liburcu.org/?p=userspace-rcu.git;a=blobdiff_plain;f=tests%2Ftest_urcu_hash.c;h=d5df1eb8ee352d872782867d4932d674bfde7123;hp=a2b5b7bca656902dc11b3d3e3d2902a8235df0c0;hb=f90535ef41a3ddef0c8bcd76a6ecb89f3fd09fc3;hpb=baf05c7167c29785d968404dec7e90cd428cc4cd diff --git a/tests/test_urcu_hash.c b/tests/test_urcu_hash.c index a2b5b7b..d5df1eb 100644 --- a/tests/test_urcu_hash.c +++ b/tests/test_urcu_hash.c @@ -540,10 +540,10 @@ int main(int argc, char **argv) "main", (unsigned long) pthread_self(), (unsigned long) gettid()); - tid_reader = malloc(sizeof(*tid_reader) * nr_readers); - tid_writer = malloc(sizeof(*tid_writer) * nr_writers); - count_reader = malloc(sizeof(*count_reader) * nr_readers); - count_writer = malloc(sizeof(*count_writer) * nr_writers); + tid_reader = calloc(nr_readers, sizeof(*tid_reader)); + tid_writer = calloc(nr_writers, sizeof(*tid_writer)); + count_reader = calloc(nr_readers, sizeof(*count_reader)); + count_writer = calloc(nr_writers, sizeof(*count_writer)); err = create_all_cpu_call_rcu_data(0); if (err) {