Browse Source

wdsp/fcurve: Initialize filter curve buffer

Value-initialize the allocated filter curve buffer.

Found by cppcheck.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 2 months ago
parent
commit
8b735e7fe3
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 2
      wdsp/fcurve.cpp

2
wdsp/fcurve.cpp

@ -33,7 +33,7 @@ namespace WDSP {
void FCurve::fc_impulse (std::vector<float>& impulse, int nc, float f0, float f1, float g0, float, int curve, float samplerate, float scale, int ctfmode, int wintype) void FCurve::fc_impulse (std::vector<float>& impulse, int nc, float f0, float f1, float g0, float, int curve, float samplerate, float scale, int ctfmode, int wintype)
{ {
float* A = new float[nc / 2 + 1]; // (float *) malloc0 ((nc / 2 + 1) * sizeof (float)); float* A = new float[nc / 2 + 1]{}; // (float *) malloc0 ((nc / 2 + 1) * sizeof (float));
int i; int i;
float fn, f; float fn, f;
int mid = nc / 2; int mid = nc / 2;

Loading…
Cancel
Save