summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2017-01-09 15:37:49 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2017-01-09 15:37:49 +0100
commitba46a8b5c5717cdff25b39a2cd03a461998921c5 (patch)
treedc5a1a48c70977d1c5b0abe90f068b17fd262f9c /src/ipcpd/normal
parente56d24010287127fc6b9c9da8d1f7cf160c50253 (diff)
downloadouroboros-ba46a8b5c5717cdff25b39a2cd03a461998921c5.tar.gz
ouroboros-ba46a8b5c5717cdff25b39a2cd03a461998921c5.zip
lib: Revise implementation of list
Adds LGPL license to the ouroboros lists.
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r--src/ipcpd/normal/ribmgr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ipcpd/normal/ribmgr.c b/src/ipcpd/normal/ribmgr.c
index e52db08a..6356d48c 100644
--- a/src/ipcpd/normal/ribmgr.c
+++ b/src/ipcpd/normal/ribmgr.c
@@ -471,9 +471,9 @@ static int write_ro_msg(struct cdap * neighbor,
int ribmgr_init()
{
- INIT_LIST_HEAD(&rib.flows);
- INIT_LIST_HEAD(&rib.subs);
- INIT_LIST_HEAD(&rib.ro_ids);
+ list_head_init(&rib.flows);
+ list_head_init(&rib.subs);
+ list_head_init(&rib.ro_ids);
rib.root = malloc(sizeof(*(rib.root)));
if (rib.root == NULL)
@@ -993,7 +993,7 @@ static int ro_id_create(char * name, ro_msg_t * msg)
tmp->seqno = msg->seqno;
tmp->full_name = strdup(name);
- INIT_LIST_HEAD(&tmp->next);
+ list_head_init(&tmp->next);
if (tmp->full_name == NULL) {
free(tmp);
@@ -1154,7 +1154,7 @@ static int ribmgr_add_flow(int fd)
return -1;
}
- INIT_LIST_HEAD(&flow->next);
+ list_head_init(&flow->next);
flow->instance = instance;
flow->fd = fd;
@@ -1310,7 +1310,7 @@ int ribmgr_enrol()
pthread_rwlock_wrlock(&rib.flows_lock);
- assert(!list_empty(&rib.flows));
+ assert(!list_is_empty(&rib.flows));
flow = list_first_entry((&rib.flows), struct mgmt_flow, next);
instance = flow->instance;
@@ -1631,7 +1631,7 @@ int ro_subscribe(const char * name, struct ro_sub_ops * ops)
if (sub == NULL)
return -ENOMEM;
- INIT_LIST_HEAD(&sub->next);
+ list_head_init(&sub->next);
sub->name = strdup(name);
if (sub->name == NULL) {