ALSA: seq: Minor cleanup of MIDI event parser helpers
authorTakashi Iwai <tiwai@suse.de>
Wed, 1 Aug 2018 12:38:18 +0000 (14:38 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 1 Aug 2018 20:54:35 +0000 (22:54 +0200)
commitef965ad5a7697ff16e3be01954f5c57208e36c22
tree283dafc3f816b4e9b007976fda683e1f87682882
parentd5e77fca87e636dda510710689b4c2ca93765598
ALSA: seq: Minor cleanup of MIDI event parser helpers

snd_midi_event_encode_byte() can never fail, and it can return rather
true/false.  Change the return type to bool, adjust the argument to
receive a MIDI byte as unsigned char, and adjust the comment
accordingly.  This allows callers to drop error checks, which
simplifies the code.

Meanwhile, snd_midi_event_encode() helper is used only in seq_midi.c,
and it can be better folded into it.  This will reduce the total
amount of lines in the end.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/seq_midi_event.h
sound/core/seq/oss/seq_oss_midi.c
sound/core/seq/seq_midi.c
sound/core/seq/seq_midi_event.c
sound/core/seq/seq_virmidi.c