Module: kamailio
Branch: master
Commit: 1b81cbc9f79354aae604e33ac978dece95c0326c
URL:
https://github.com/kamailio/kamailio/commit/1b81cbc9f79354aae604e33ac978dec…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-12-11T12:25:56+01:00
tm: use helper macro to get structure address from member
---
Modified: src/modules/tm/timer.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1b81cbc9f79354aae604e33ac978dec…
Patch:
https://github.com/kamailio/kamailio/commit/1b81cbc9f79354aae604e33ac978dec…
---
diff --git a/src/modules/tm/timer.c b/src/modules/tm/timer.c
index a2ebb434ccb..c0cbade59d6 100644
--- a/src/modules/tm/timer.c
+++ b/src/modules/tm/timer.c
@@ -486,8 +486,8 @@ ticks_t retr_buf_handler(ticks_t ticks, struct timer_ln *tl, void *p)
unsigned long crt_retr_interval_ms;
struct cell *t;
- rbuf = (struct retr_buf *)((void *)tl
- - (void *)(&((struct retr_buf *)0)->timer));
+ rbuf = ksr_container_of(tl, struct retr_buf, timer);
+
membar_depends(); /* to be on the safe side */
t = rbuf->my_T;