aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/midi.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-09-20 03:43:13 +0200
committercbdev <cb@cbcdn.com>2019-09-20 03:43:13 +0200
commitfe4a7b538b9b6c53299d883bee258e4d3597be9d (patch)
tree56f8571ffab44c18e878aafaef26d5c32865618e /backends/midi.c
parent079baff220a963c365ab8448c421e22e896caaf1 (diff)
downloadmidimonster-fe4a7b538b9b6c53299d883bee258e4d3597be9d.tar.gz
midimonster-fe4a7b538b9b6c53299d883bee258e4d3597be9d.tar.bz2
midimonster-fe4a7b538b9b6c53299d883bee258e4d3597be9d.zip
Update documentation, fix minor leaks
Diffstat (limited to 'backends/midi.c')
-rw-r--r--backends/midi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/backends/midi.c b/backends/midi.c
index 65ce48a..d9ac698 100644
--- a/backends/midi.c
+++ b/backends/midi.c
@@ -358,7 +358,7 @@ static int midi_start(){
//connect to the sequencer
if(snd_seq_open(&sequencer, "default", SND_SEQ_OPEN_DUPLEX, 0) < 0){
fprintf(stderr, "Failed to open ALSA sequencer\n");
- return 0;
+ goto bail;
}
snd_seq_nonblock(sequencer, 1);
@@ -367,7 +367,7 @@ static int midi_start(){
//update the sequencer client name
if(snd_seq_set_client_name(sequencer, sequencer_name ? sequencer_name : "MIDIMonster") < 0){
fprintf(stderr, "Failed to set MIDI client name to %s\n", sequencer_name);
- return 1;
+ goto bail;
}
//create all ports