Commit 72a358ca authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Also explicitly cast the return of the allocation of the a_table in the cosmology initialisation.

parent 880fa3c6
......@@ -304,7 +304,7 @@ void cosmology_init_tables(struct cosmology *c) {
/* Prepare a table of scale factors for the integral bounds */
const double delta_a =
(c->log_a_end - c->log_a_begin) / cosmology_table_length;
double *a_table = malloc(cosmology_table_length * sizeof(double));
double *a_table = (double *)malloc(cosmology_table_length * sizeof(double));
for (int i = 0; i < cosmology_table_length; i++)
a_table[i] = exp(c->log_a_begin + delta_a * (i + 1));
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment