typecast malloc in a math function in case someone wants to compile it in c++

This commit is contained in:
Scott Fennell 2019-01-17 15:48:38 -06:00
parent 024cf2eb5f
commit 6240b2a893

View File

@ -25,7 +25,7 @@ int LUD_inv( /* RETURN: -- Zero */
// Duplicate the input matrix because LU_dcmp alters
// the matrix passed to it.
work_matrix = malloc(n * sizeof(double *));
work_matrix = (double **) malloc(n * sizeof(double *));
mdata = (double *) malloc(n * n * sizeof(double));
for (i = 0; i < n; i++) {
work_matrix[i] = &mdata[i * n];