[alsa-devel] [FFADO-devel] [PATCH 05/44] firewire-lib: Add support for MIDI capture/playback
Jano Svitok
jan.svitok at gmail.com
Wed Apr 2 22:37:31 CEST 2014
On Wed, Apr 2, 2014 at 9:58 PM, Clemens Ladisch <clemens at ladisch.de> wrote:
>
> Adrian Knoth wrote:
> > On Wed, Apr 02, 2014 at 09:29:20PM +0200, Clemens Ladisch wrote:
> >
> >>> + len = b[0] - 0x80;
> >>> + if ((len > 1) && (3 < len) && (s->midi[port]))
> >>
> >> This condition is true only for len==2.
> >
> > I don't know if len can be larger than 3. If so, the condition requires
> > len to be at least 4.
> Oops, you're right. (The goal is do detect 1..3.)
The condition looks like it's equal to
if ((len > 1) && (len > 3) && (s->midi[port]))
or simply
if ((len > 3) && (s->midi[port]))
Perhaps in these cases it's better to have either same order of operands or
same/similar operators...
Jano
More information about the Alsa-devel
mailing list