[alsa-devel] [PATCH 2/3] ALSA: tascam: improve loop condition to filling MIDI bytes in transaction
Takashi Iwai
tiwai at suse.de
Sun Oct 18 12:10:16 CEST 2015
On Sun, 18 Oct 2015 12:02:17 +0200,
Takashi Sakamoto wrote:
>
> It includes meaningless condition. This commit improve it.
>
> Signed-off-by: Takashi Sakamoto <o-takashi at sakamocchi.jp>
> ---
> sound/firewire/tascam/tascam-transaction.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/firewire/tascam/tascam-transaction.c b/sound/firewire/tascam/tascam-transaction.c
> index 7fcee81..4ffaa8a 100644
> --- a/sound/firewire/tascam/tascam-transaction.c
> +++ b/sound/firewire/tascam/tascam-transaction.c
> @@ -74,7 +74,7 @@ static int fill_message(struct snd_rawmidi_substream *substream, u8 *buf)
> /* On exclusive message. */
> if (tscm->on_sysex[port]) {
> /* Seek the end of exclusives. */
> - for (i = 1; i < 4 || i < len; ++i) {
> + for (i = 1; i < len + 1; ++i) {
This doesn't look like an improvement...
The fix should be rather like:
for (i = 1; i < 4 && i < len; ++i) {
Takashi
More information about the Alsa-devel
mailing list