mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
node: initialise hook lists only when hooks are supported
This commit is contained in:
parent
1740df596b
commit
0c382890f7
1 changed files with 3 additions and 1 deletions
|
@ -70,9 +70,11 @@ static int node_direction_init(struct node_direction *nd, struct node *n)
|
|||
nd->hooks.state = STATE_DESTROYED;
|
||||
nd->signals.state = STATE_DESTROYED;
|
||||
|
||||
#ifdef WITH_HOOKS
|
||||
ret = vlist_init(&nd->hooks);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif /* WITH_HOOKS */
|
||||
|
||||
ret = vlist_init(&nd->signals);
|
||||
if (ret)
|
||||
|
@ -89,7 +91,7 @@ static int node_direction_destroy(struct node_direction *nd, struct node *n)
|
|||
ret = vlist_destroy(&nd->hooks, (dtor_cb_t) hook_destroy, true);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
#endif /* WITH_HOOKS */
|
||||
|
||||
ret = vlist_destroy(&nd->signals, (dtor_cb_t) signal_decref, false);
|
||||
if (ret)
|
||||
|
|
Loading…
Add table
Reference in a new issue