From 6dcd4fec7d0c520742c424eb04b286d8db2b4df9 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 15 May 2014 01:21:22 -0700 Subject: Remove some unnecessary casts --- utils/makehrtf.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/utils/makehrtf.c b/utils/makehrtf.c index f98f6820..f8ac66c6 100644 --- a/utils/makehrtf.c +++ b/utils/makehrtf.c @@ -769,21 +769,22 @@ static int HpTpdfDither (const double in, int * hpHist) { } // Allocates an array of doubles. -static double * CreateArray (const size_t n) { - double * a = NULL; - - a = (double *) calloc (n, sizeof (double)); - if (a == NULL) { - fprintf (stderr, "Error: Out of memory.\n"); - exit (-1); - } - return (a); +static double *CreateArray(const size_t n) +{ + double *a; + + a = calloc(n, sizeof(double)); + if(a == NULL) + { + fprintf(stderr, "Error: Out of memory.\n"); + exit(-1); + } + return a; } // Frees an array of doubles. -static void DestroyArray (const double * a) { - free ((void *) a); -} +static void DestroyArray(double *a) +{ free(a); } // Complex number routines. All outputs must be non-NULL. -- cgit v1.2.3