diff options
author | cbdev <cb@cbcdn.com> | 2020-01-12 17:34:14 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2020-01-12 17:34:14 +0100 |
commit | 78b21a9ac3f975f35ec7b61108531e1495eb91c0 (patch) | |
tree | f41cfc78f3392d501293c3afdd7b42111c863615 /backends/midi.c | |
parent | 0a696be5af7db63c1c7354518c839d8543f1ba25 (diff) | |
download | midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.tar.gz midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.tar.bz2 midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.zip |
Rework instance creation
Diffstat (limited to 'backends/midi.c')
-rw-r--r-- | backends/midi.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/backends/midi.c b/backends/midi.c index 11d759d..f73ebb4 100644 --- a/backends/midi.c +++ b/backends/midi.c @@ -69,19 +69,14 @@ static int midi_configure(char* option, char* value){ return 1; } -static instance* midi_instance(){ - instance* inst = mm_instance(); - if(!inst){ - return NULL; - } - +static int midi_instance(instance* inst){ inst->impl = calloc(1, sizeof(midi_instance_data)); if(!inst->impl){ LOG("Failed to allocate memory"); - return NULL; + return 1; } - return inst; + return 0; } static int midi_configure_instance(instance* inst, char* option, char* value){ |