Skip to content
  • Takashi Iwai's avatar
    ALSA: seq: Minor cleanup of MIDI event parser helpers · ef965ad5
    Takashi Iwai authored
    
    
    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: default avatarTakashi Iwai <tiwai@suse.de>
    ef965ad5