aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/sacn.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2020-01-12 17:34:14 +0100
committercbdev <cb@cbcdn.com>2020-01-12 17:34:14 +0100
commit78b21a9ac3f975f35ec7b61108531e1495eb91c0 (patch)
treef41cfc78f3392d501293c3afdd7b42111c863615 /backends/sacn.c
parent0a696be5af7db63c1c7354518c839d8543f1ba25 (diff)
downloadmidimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.tar.gz
midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.tar.bz2
midimonster-78b21a9ac3f975f35ec7b61108531e1495eb91c0.zip
Rework instance creation
Diffstat (limited to 'backends/sacn.c')
-rw-r--r--backends/sacn.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/backends/sacn.c b/backends/sacn.c
index ff2b61e..5096123 100644
--- a/backends/sacn.c
+++ b/backends/sacn.c
@@ -195,19 +195,14 @@ static int sacn_configure_instance(instance* inst, char* option, char* value){
return 1;
}
-static instance* sacn_instance(){
- instance* inst = mm_instance();
- if(!inst){
- return NULL;
- }
-
+static int sacn_instance(instance* inst){
inst->impl = calloc(1, sizeof(sacn_instance_data));
if(!inst->impl){
LOG("Failed to allocate memory");
- return NULL;
+ return 1;
}
- return inst;
+ return 0;
}
static channel* sacn_channel(instance* inst, char* spec, uint8_t flags){