[alsa-devel] [patch] ALSA: bebob: sizeof() vs ARRAY_SIZE() typo
Dan Carpenter
dan.carpenter at oracle.com
Wed May 28 18:43:30 CEST 2014
ARRAY_SIZE() was intended here instead of sizeof(). The
"bridgeco_freq_table" array holds integers so the original condition is
never true.
Signed-off-by: Dan Carpenter <dan.carpenter at oracle.com>
diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c
index 514c7c9..bc4f827 100644
--- a/sound/firewire/bebob/bebob_stream.c
+++ b/sound/firewire/bebob/bebob_stream.c
@@ -749,7 +749,7 @@ parse_stream_formation(u8 *buf, unsigned int len,
if (buf[2] == bridgeco_freq_table[i])
break;
}
- if (i == sizeof(bridgeco_freq_table))
+ if (i == ARRAY_SIZE(bridgeco_freq_table))
return -ENOSYS;
/* Avoid double count by different entries for the same rate. */
More information about the Alsa-devel
mailing list