diff options
| -rw-r--r-- | lib/agentx.c | 4 | ||||
| -rw-r--r-- | lib/northbound_grpc.cpp | 2 | ||||
| -rw-r--r-- | vrrpd/vrrp.c | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/lib/agentx.c b/lib/agentx.c index e03e19aad5..4c087219cb 100644 --- a/lib/agentx.c +++ b/lib/agentx.c @@ -146,9 +146,9 @@ static void agentx_events_update(void) else if (FD_ISSET(fd, &fds)) { struct listnode *newln; thr = XCALLOC(MTYPE_TMP, sizeof(struct thread *)); - thread_add_read(agentx_tm, agentx_read, NULL, fd, thr); + newln = listnode_add_before(events, ln, thr); - (*thr)->arg = newln; + thread_add_read(agentx_tm, agentx_read, newln, fd, thr); } } diff --git a/lib/northbound_grpc.cpp b/lib/northbound_grpc.cpp index 9cb999110b..95721ffc77 100644 --- a/lib/northbound_grpc.cpp +++ b/lib/northbound_grpc.cpp @@ -198,7 +198,7 @@ class RpcStateBase static void c_callback(struct thread *thread) { - auto _tag = static_cast<RpcStateBase *>(thread->arg); + auto _tag = static_cast<RpcStateBase *>(THREAD_ARG(thread)); /* * We hold the lock until the callback finishes and has updated * _tag->state, then we signal done and release. diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c index 3081c0d955..4a0356411f 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -985,7 +985,7 @@ static int vrrp_recv_advertisement(struct vrrp_router *r, struct ipaddr *src, */ static void vrrp_read(struct thread *thread) { - struct vrrp_router *r = thread->arg; + struct vrrp_router *r = THREAD_ARG(thread); struct vrrp_pkt *pkt; ssize_t pktsize; @@ -1480,7 +1480,7 @@ static void vrrp_change_state(struct vrrp_router *r, int to) */ static void vrrp_adver_timer_expire(struct thread *thread) { - struct vrrp_router *r = thread->arg; + struct vrrp_router *r = THREAD_ARG(thread); DEBUGD(&vrrp_dbg_proto, VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM @@ -1508,7 +1508,7 @@ static void vrrp_adver_timer_expire(struct thread *thread) */ static void vrrp_master_down_timer_expire(struct thread *thread) { - struct vrrp_router *r = thread->arg; + struct vrrp_router *r = THREAD_ARG(thread); zlog_info(VRRP_LOGPFX VRRP_LOGPFX_VRID VRRP_LOGPFX_FAM "Master_Down_Timer expired", |
