Module: kamailio
Branch: master
Commit: 84ea36b4b79c07c4fc0a8c9e119184433353764e
URL: 
https://github.com/kamailio/kamailio/commit/84ea36b4b79c07c4fc0a8c9e119184433353764e

Author: Daniel-Constantin Mierla <mico...@gmail.com>
Committer: Daniel-Constantin Mierla <mico...@gmail.com>
Date: 2024-07-18T12:29:05+02:00

core: remove unnecessary check after using the structure

---

Modified: src/core/msg_translator.c

---

Diff:  
https://github.com/kamailio/kamailio/commit/84ea36b4b79c07c4fc0a8c9e119184433353764e.diff
Patch: 
https://github.com/kamailio/kamailio/commit/84ea36b4b79c07c4fc0a8c9e119184433353764e.patch

---

diff --git a/src/core/msg_translator.c b/src/core/msg_translator.c
index ab02fb7c47c..f26abd2e79d 100644
--- a/src/core/msg_translator.c
+++ b/src/core/msg_translator.c
@@ -2384,7 +2384,7 @@ char *generate_res_buf_from_sip_res(
        }
 
        /* test and add xavp via reply params */
-       if(msg && msg->via2 && (msg->msg_flags & FL_ADD_XAVP_VIA_REPLY_PARAMS)
+       if(msg->via2 && (msg->msg_flags & FL_ADD_XAVP_VIA_REPLY_PARAMS)
                        && _ksr_xavp_via_reply_params.len > 0) {
                xparams.s = pv_get_buffer();
                xparams.len = 
xavp_serialize_fields_style(&_ksr_xavp_via_reply_params,

_______________________________________________
Kamailio (SER) - Development Mailing List
To unsubscribe send an email to sr-dev-le...@lists.kamailio.org

Reply via email to