[sr-dev] git:master:700b334b: modules/[call_control|mediaproxy]: proper assigment to NULL pointer

Mikko Lehto mslehto at iki.fi
Wed May 25 21:33:37 CEST 2016


Module: kamailio
Branch: master
Commit: 700b334b51b39056c4c0004451ca41304510f164
URL: https://github.com/kamailio/kamailio/commit/700b334b51b39056c4c0004451ca41304510f164

Author: Mikko Lehto <mslehto at iki.fi>
Committer: Mikko Lehto <mslehto at iki.fi>
Date: 2016-05-24T13:23:45+03:00

modules/[call_control|mediaproxy]: proper assigment to NULL pointer

CC (clang) [M mediaproxy.so]          mediaproxy.o
mediaproxy.c:1929:27: warning: expression which evaluates to zero treated as a null pointer constant of type 'void *' [-Wnon-literal-null-conversion]
        *_params->param = MPInactive;
                          ^~~~~~~~~~

---

Modified: modules/call_control/call_control.c
Modified: modules/mediaproxy/mediaproxy.c

---

Diff:  https://github.com/kamailio/kamailio/commit/700b334b51b39056c4c0004451ca41304510f164.diff
Patch: https://github.com/kamailio/kamailio/commit/700b334b51b39056c4c0004451ca41304510f164.patch

---

diff --git a/modules/call_control/call_control.c b/modules/call_control/call_control.c
index 62af924..5450e00 100644
--- a/modules/call_control/call_control.c
+++ b/modules/call_control/call_control.c
@@ -985,7 +985,7 @@ __dialog_ended(struct dlg_cell *dlg, int type, struct dlg_cb_params *_params)
         if( !msg || msg == FAKED_REPLY)
             msg = _params->req;
         call_control_stop(msg, dlg->callid);
-        *_params->param = (void*)CCInactive;
+        *_params->param = NULL;
     }
 }
 
diff --git a/modules/mediaproxy/mediaproxy.c b/modules/mediaproxy/mediaproxy.c
index f96a635..5b37add 100644
--- a/modules/mediaproxy/mediaproxy.c
+++ b/modules/mediaproxy/mediaproxy.c
@@ -1926,7 +1926,7 @@ __dialog_ended(struct dlg_cell *dlg, int type, struct dlg_cb_params *_params)
 {
     if ((int)(long)*_params->param == MPActive) {
         end_media_session(dlg->callid, dlg->tag[DLG_CALLER_LEG], dlg->tag[DLG_CALLEE_LEG]);
-        *_params->param = MPInactive;
+        *_params->param = NULL;
     }
 }
 




More information about the sr-dev mailing list