diff options
author | Petri Latvala <petri.latvala@intel.com> | 2019-01-16 13:20:43 +0200 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2019-01-21 13:51:01 +0200 |
commit | 13e67a6e21efd1cd800b0366f6cd13ace30677f1 (patch) | |
tree | 778dfbed8bcf0301a59977b3a58625675be1c8ca /lib | |
parent | d979b493e1378408985bdea928136e3a5698228e (diff) |
lib/igt_audio: Initialize freq in audio_signal_detect()
It's not clear to the static analyzer that freq is assigned when
handling the previous frame and then used in the next. In fact, it
wasn't clear to me either before staring at the code for some
minutes. Initializing it to something makes both of us happier.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_audio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_audio.c b/lib/igt_audio.c index 229ce6c6..a0592d53 100644 --- a/lib/igt_audio.c +++ b/lib/igt_audio.c @@ -250,7 +250,7 @@ bool audio_signal_detect(struct audio_signal *signal, int channels, int threshold; bool above; int error; - int freq; + int freq = 0; int max; int c, i, j; |