From 34f88418052109073252e99c1c757e3b5c9adc13 Mon Sep 17 00:00:00 2001 From: rlar Date: Thu, 16 Jun 2016 20:07:20 +0200 Subject: [PATCH] cpl/cplsetup.c, cleanup --- src/spicelib/devices/cpl/cplsetup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/spicelib/devices/cpl/cplsetup.c b/src/spicelib/devices/cpl/cplsetup.c index bedb65f20..0ad24d9ab 100644 --- a/src/spicelib/devices/cpl/cplsetup.c +++ b/src/spicelib/devices/cpl/cplsetup.c @@ -565,18 +565,18 @@ new_memory(int dim, int deg, int deg_o) ****************************************************************/ -static double -*vector(int nl, int nh) +static double * +vector(int nl, int nh) { - double *v; + double *v = TMALLOC(double, nh - nl + 1); - v = TMALLOC(double, (unsigned) (nh - nl + 1)); if (!v) { fprintf(stderr, "Memory Allocation Error by tmalloc in vector().\n"); fprintf(stderr, "...now exiting to system ...\n"); controlled_exit(EXIT_FAILURE); } - return v-nl; + + return v - nl; } static void @@ -584,7 +584,7 @@ free_vector(double *v, int nl, int nh) { NG_IGNORE(nh); - free((void*) (v +nl)); + free(v + nl); } static void