diff --git a/include/villas/list.h b/include/villas/list.h index 75205f36f..f3b13630f 100644 --- a/include/villas/list.h +++ b/include/villas/list.h @@ -41,14 +41,6 @@ extern "C" { #define LIST_CHUNKSIZE 16 /** Static list initialization */ -#define LIST_INIT() { \ - .array = NULL, \ - .length = 0, \ - .capacity = 0, \ - .lock = PTHREAD_MUTEX_INITIALIZER, \ - .state = STATE_INITIALIZED \ -} - #define LIST_INIT_STATIC(l) \ __attribute__((constructor(105))) static void UNIQUE(__ctor)() {\ if ((l)->state == STATE_DESTROYED) \ diff --git a/lib/nodes/iec61850.c b/lib/nodes/iec61850.c index 81e8545a2..8dcf789f2 100644 --- a/lib/nodes/iec61850.c +++ b/lib/nodes/iec61850.c @@ -60,11 +60,13 @@ const struct iec61850_type_descriptor type_descriptors[] = { }; /** Each network interface needs a separate receiver */ -static struct list receivers = LIST_INIT(); +static struct list receivers; static pthread_t thread; static EthernetHandleSet hset; static int users = 0; +LIST_INIT_STATIC(&receivers); + static void * iec61850_thread(void *ctx) { int ret;