[sr-dev] git:5.1:cb5d201b: erlang: fix never used value assigned to a variable

Seudin Kasumovic seudin.kasumovic at gmail.com
Thu Jan 4 09:29:27 CET 2018


Module: kamailio
Branch: 5.1
Commit: cb5d201bf313955305e66c976bf77d87c7295ba9
URL: https://github.com/kamailio/kamailio/commit/cb5d201bf313955305e66c976bf77d87c7295ba9

Author: Seudin Kasumovic <seudin.kasumovic at gmail.com>
Committer: Seudin Kasumovic <seudin.kasumovic at gmail.com>
Date: 2018-01-04T09:24:34+01:00

erlang: fix never used value assigned to a variable

(cherry picked from commit 6542a367638ec5f8a2b62994f8c309e7a2533962)

---

Modified: src/modules/erlang/pv_xbuff.c

---

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

---

diff --git a/src/modules/erlang/pv_xbuff.c b/src/modules/erlang/pv_xbuff.c
index 1682e52f3b..ce6e2bd2eb 100644
--- a/src/modules/erlang/pv_xbuff.c
+++ b/src/modules/erlang/pv_xbuff.c
@@ -87,10 +87,10 @@ sr_xavp_t *xbuff_new(str *name)
 	if(!xbuffs_root)
 	{
 		xbuff = xavp_add_xavp_value(&xbuff_list,name,&xbuff_val,xavp_get_crt_list());
+	} else {
+		xbuff = xavp_get_child(&xbuff_list, name);
 	}
 
-	xbuff=xavp_get_child(&xbuff_list, name);
-
 	if (!xbuff) {
 
 		xbuff_val.type = SR_XTYPE_NULL;




More information about the sr-dev mailing list