From 999b5dec615ce4cfb30ee909bdd16e79a5e2a1ce Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Mon, 28 Aug 2017 20:12:55 +0200 Subject: ipcpd: Address comments on 176698e --- src/ipcpd/normal/connmgr.c | 3 +-- src/ipcpd/normal/dt.c | 2 +- src/ipcpd/normal/main.c | 2 +- src/ipcpd/normal/pol/link_state.c | 5 ----- src/ipcpd/normal/sdu_sched.c | 2 +- 5 files changed, 4 insertions(+), 10 deletions(-) (limited to 'src/ipcpd') diff --git a/src/ipcpd/normal/connmgr.c b/src/ipcpd/normal/connmgr.c index 11f83247..fa43b97a 100644 --- a/src/ipcpd/normal/connmgr.c +++ b/src/ipcpd/normal/connmgr.c @@ -207,9 +207,8 @@ int connmgr_ae_init(enum ae_id id, ae = connmgr.aes + id; - if (pthread_mutex_init(&ae->lock, NULL)) { + if (pthread_mutex_init(&ae->lock, NULL)) return -1; - } if (pthread_cond_init(&ae->cond, NULL)) { pthread_mutex_destroy(&ae->lock); diff --git a/src/ipcpd/normal/dt.c b/src/ipcpd/normal/dt.c index aa089852..282f6bee 100644 --- a/src/ipcpd/normal/dt.c +++ b/src/ipcpd/normal/dt.c @@ -207,7 +207,7 @@ int dt_init(enum pol_routing pr, if (connmgr_ae_init(AEID_DT, &info, dt.nbs)) { log_err("Failed to register with connmgr."); goto fail_connmgr_ae_init; - }; + } if (routing_init(pr, dt.nbs)) { log_err("Failed to init routing."); diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c index bef04b7a..0a41f883 100644 --- a/src/ipcpd/normal/main.c +++ b/src/ipcpd/normal/main.c @@ -250,7 +250,7 @@ static int normal_ipcp_enroll(const char * dst, if (dt_start()) { log_err("Failed to initialize IPCP components."); goto fail_dt_start; - }; + } if (connmgr_alloc(AEID_DT, dst, NULL, &dt_conn)) { log_err("Failed to create a data transfer flow."); diff --git a/src/ipcpd/normal/pol/link_state.c b/src/ipcpd/normal/pol/link_state.c index 6bc59d6b..512ced7f 100644 --- a/src/ipcpd/normal/pol/link_state.c +++ b/src/ipcpd/normal/pol/link_state.c @@ -130,11 +130,6 @@ static int link_state_neighbor_event(enum nb_event event, size_t len; uint8_t * data; - /* Only announce the flow if our address is bigger - if (ipcpi.dt_addr < conn.conn_info.addr) - return 0; - */ - path[0] = '\0'; sprintf(fso_name, "%" PRIu64 "-%" PRIu64, ipcpi.dt_addr, conn.conn_info.addr); diff --git a/src/ipcpd/normal/sdu_sched.c b/src/ipcpd/normal/sdu_sched.c index 045d536a..10b0f02f 100644 --- a/src/ipcpd/normal/sdu_sched.c +++ b/src/ipcpd/normal/sdu_sched.c @@ -172,7 +172,7 @@ void sdu_sched_add(struct sdu_sched * sdu_sched, { qoscube_t qc; - /* assert(sdu_sched); */ + assert(sdu_sched); ipcp_flow_get_qoscube(fd, &qc); flow_set_add(sdu_sched->set[qc], fd); -- cgit v1.2.3