Hi Clemens, On May 11 2016 16:48, Clemens Ladisch wrote: > Takashi Sakamoto wrote: >> On most of audio and music units on IEEE 1394 bus which ALSA firewire stack >> supports (or plans to support), CIP with two quadlets header is used. >> Thus, there's no cases to queue packets with blank payload. If such packets >> are going to be queued, it means that they're for skips of the cycle. >> >> This commit simplifies helper functions to queue a packet. > >> @@ -383,8 +382,10 @@ static int queue_packet(struct amdtp_stream *s, >> p.tag = TAG_CIP; >> p.header_length = header_length; >> - p.payload_length = (!skip) ? payload_length : 0; >> - p.skip = skip; >> + if (payload_length > 0) >> + p.payload_length = payload_length; >> + else >> + p.skip = true; > > This can be simplified to: > p.payload_length = payload_length; > p.skip = payload_length == 0; Yep, but I prefer to split assignment from evaluation in different lines, just from my taste. > Acked-by: Clemens Ladisch <clemens@xxxxxxxxxx> Thanks Takashi Sakamoto _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel