Mercurial > hg > libxtract
changeset 122:571c53e87dbd
- fixed typos in *result initialisation potentially fixing horrible bug
author | Jamie Bullock <jamie@postlude.co.uk> |
---|---|
date | Wed, 30 Mar 2011 10:05:07 +0000 |
parents | 25fc4d0767f9 |
children | efb1c1ae2ba8 |
files | src/Makefile.am src/scalar.c |
diffstat | 2 files changed, 11 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Makefile.am Mon Aug 23 11:28:39 2010 +0000 +++ b/src/Makefile.am Wed Mar 30 10:05:07 2011 +0000 @@ -13,3 +13,5 @@ libxtract_la_CFLAGS = $(FFT_DEFINE) libxtract_la_SOURCES = $(SOURCES) libxtract_la_LDFLAGS = -export-dynamic + +EXTRA_DIST = xtract_globals_private.h xtract_macros_private.h xtract_window_private.h
--- a/src/scalar.c Mon Aug 23 11:28:39 2010 +0000 +++ b/src/scalar.c Wed Mar 30 10:05:07 2011 +0000 @@ -74,7 +74,7 @@ int n = N; - *result += 0.f; + *result = 0.f; while(n--) *result += powf(data[n] - *(float *)argv, 2); @@ -95,7 +95,7 @@ int n = N; - *result += 0.f; + *result = 0.f; while(n--) *result += fabsf(data[n] - *(float *)argv); @@ -111,7 +111,7 @@ float temp = 0.f; - *result += 0.f; + *result = 0.f; while(n--){ temp = (data[n] - ((float *)argv)[0]) / ((float *)argv)[1]; @@ -130,7 +130,7 @@ float temp = 0.f; - *result += 0.f; + *result = 0.f; while(n--){ temp = (data[n] - ((float *)argv)[0]) / ((float *)argv)[1]; @@ -183,7 +183,7 @@ amps = data; freqs = data + m; - *result += 0.f; + *result = 0.f; while(m--){ A += amps[m]; @@ -213,7 +213,7 @@ amps = data; freqs = data + m; - *result += 0.f; + *result = 0.f; while(m--){ A += amps[m]; @@ -236,7 +236,7 @@ amps = data; freqs = data + m; - *result += 0.f; + *result = 0.f; while(m--){ A += amps[m]; @@ -261,7 +261,7 @@ amps = data; freqs = data + m; - *result += 0.f; + *result = 0.f; while(m--){ A += amps[m]; @@ -763,7 +763,7 @@ int n = N; - *result += 0.f; + *result = 0.f; while(n--) *result += (*data++ ? 1 : 0);