Browse Source

modemm17: initialize SyncWord sample buffer

Initialize samples_ during construction so the sample buffer is not left
indeterminate. The existing triggered_ state ensures the buffer is
initialized with fill() before its contents are used, so this is defensive
initialization rather than a functional fix.

Detected by cppcheck.

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 3 months ago
parent
commit
b82bccdadc
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 1
      modemm17/Correlator.h

1
modemm17/Correlator.h

@ -135,6 +135,7 @@ struct SyncWord @@ -135,6 +135,7 @@ struct SyncWord
float magnitude_2 = std::numeric_limits<float>::lowest()
) :
sync_word_(std::move(sync_word)),
samples_{},
magnitude_1_(magnitude_1),
magnitude_2_(magnitude_2)
{}

Loading…
Cancel
Save