aboutsummaryrefslogtreecommitdiff
path: root/src/c/nnls.c
diff options
context:
space:
mode:
authorCalvin Morrison <mutantturkey@gmail.com>2013-11-07 15:31:42 -0500
committerCalvin Morrison <mutantturkey@gmail.com>2013-11-07 15:31:42 -0500
commit6a31527ac8a94d12732dda60dbbf0069e5cc1490 (patch)
tree9b5795b4a2928593cca0cf8167dc0da589ca5278 /src/c/nnls.c
parenta1c0cc6cca98ec16c0b95268bcc84888eb5f701e (diff)
don't cast the return of calloc
Diffstat (limited to 'src/c/nnls.c')
-rw-r--r--src/c/nnls.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/c/nnls.c b/src/c/nnls.c
index f45bfec..a09debd 100644
--- a/src/c/nnls.c
+++ b/src/c/nnls.c
@@ -182,9 +182,9 @@ int64_t nnls_algorithm(double *a, int64_t m,int64_t n, double *b, double *x, dou
return(2);
/* Allocate memory for working space, if required */
- double *w = (double*)calloc(n, sizeof(double));
- double *zz = (double*)calloc(m, sizeof(double));
- int64_t *index = (int64_t*)calloc(n, sizeof(int64_t));
+ double *w = calloc(n, sizeof(double));
+ double *zz = calloc(m, sizeof(double));
+ int64_t *index = calloc(n, sizeof(int64_t));
if(w == NULL || zz == NULL || index == NULL)
return(2);
@@ -398,7 +398,7 @@ int64_t nnls_algorithm(double *a, int64_t m,int64_t n, double *b, double *x, dou
double *nnls(double *a_matrix, double *b_matrix, int64_t height, int64_t width) {
- double *solution = (double*)calloc(height, sizeof(double));
+ double *solution = calloc(height, sizeof(double));
if(solution == NULL) {
fprintf(stderr, "could not allocate enough memory for nnls\n");