From 9dbaf860f2152d459e27e06e2c0d0a811479cf84 Mon Sep 17 00:00:00 2001 From: Mark Borgerding Date: Fri, 13 Mar 2009 00:34:55 +0000 Subject: [PATCH] put declarations at the top of the function ,ANSI style --- tools/kiss_fftndr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/kiss_fftndr.c b/tools/kiss_fftndr.c index ab0f13c..ba550dd 100644 --- a/tools/kiss_fftndr.c +++ b/tools/kiss_fftndr.c @@ -39,6 +39,7 @@ kiss_fftndr_cfg kiss_fftndr_alloc(const int *dims,int ndims,int inverse_fft,void size_t nr=0 , nd=0,ntmp=0; int dimReal = dims[ndims-1]; int dimOther = prod(dims,ndims-1); + size_t memneeded; (void)kiss_fftr_alloc(dimReal,inverse_fft,NULL,&nr); (void)kiss_fftnd_alloc(dims,ndims-1,inverse_fft,NULL,&nd); @@ -46,7 +47,7 @@ kiss_fftndr_cfg kiss_fftndr_alloc(const int *dims,int ndims,int inverse_fft,void MAX( 2*dimOther , dimReal+2) * sizeof(kiss_fft_scalar) // freq buffer for one pass + dimOther*(dimReal+2) * sizeof(kiss_fft_scalar); // large enough to hold entire input in case of in-place - size_t memneeded = sizeof( struct kiss_fftndr_state ) + nr + nd + ntmp; + memneeded = sizeof( struct kiss_fftndr_state ) + nr + nd + ntmp; if (lenmem==NULL) { st = (kiss_fftndr_cfg) malloc(memneeded);