Thread (4 messages) 4 messages, 3 authors, 2019-05-24

[igt-dev] [PATCH i-g-t] lib/igt_audio: fix uninitialized variable

From: Simon Ser <hidden>
Date: 2019-05-23 10:49:23
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Seems like I'm not used to the C89 style yet, and ASan caught it but with a
completely unrelated stack trace.

Signed-off-by: Simon Ser <redacted>
---
 lib/igt_audio.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/lib/igt_audio.c b/lib/igt_audio.c
index 07935e660c5a..376e04ba6ed6 100644
--- a/lib/igt_audio.c
+++ b/lib/igt_audio.c
@@ -205,6 +205,7 @@ static size_t audio_signal_count_freqs(struct audio_signal *signal, int channel)
 	size_t n, i;
 	struct audio_signal_freq *freq;

+	n = 0;
 	for (i = 0; i < signal->freqs_count; i++) {
 		freq = &signal->freqs[i];
 		if (freq->channel < 0 || freq->channel == channel)
--
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help