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/osc.c | |
parent | 0a696be5af7db63c1c7354518c839d8543f1ba25 (diff) | |
download | midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.tar.gz midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.tar.bz2 midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.zip |
Rework instance creation
Diffstat (limited to 'backends/osc.c')
-rw-r--r-- | backends/osc.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/backends/osc.c b/backends/osc.c index 7b9a5a5..754c290 100644 --- a/backends/osc.c +++ b/backends/osc.c @@ -562,21 +562,16 @@ static int osc_configure_instance(instance* inst, char* option, char* value){ return 1; } -static instance* osc_instance(){ - instance* inst = mm_instance(); - if(!inst){ - return NULL; - } - +static int osc_instance(instance* inst){ osc_instance_data* data = calloc(1, sizeof(osc_instance_data)); if(!data){ LOG("Failed to allocate memory"); - return NULL; + return 1; } data->fd = -1; inst->impl = data; - return inst; + return 0; } static channel* osc_map_channel(instance* inst, char* spec, uint8_t flags){ |