[sr-dev] git:master:14975b6e: cdp: fix a coverity scan error, duplicated code for logical statement

Henning Westerholt hw at kamailio.org
Sun Dec 30 01:21:14 CET 2018


Module: kamailio
Branch: master
Commit: 14975b6e7e028aea9db198c64b65526fb9bd20b7
URL: https://github.com/kamailio/kamailio/commit/14975b6e7e028aea9db198c64b65526fb9bd20b7

Author: Henning Westerholt <hw at kamailio.org>
Committer: Henning Westerholt <hw at kamailio.org>
Date: 2018-12-30T00:41:58+01:00

cdp: fix a coverity scan error, duplicated code for logical statement

---

Modified: src/modules/cdp/session.c

---

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

---

diff --git a/src/modules/cdp/session.c b/src/modules/cdp/session.c
index dd5c026e3e..60e97becae 100644
--- a/src/modules/cdp/session.c
+++ b/src/modules/cdp/session.c
@@ -607,8 +607,8 @@ AAASession* cdp_new_cc_acc_session(str id, int is_statefull)
 	AAASession *s;
 	cdp_session_type_t type;
 
-	if (is_statefull) type = ACCT_CC_CLIENT;
-	else type = ACCT_CC_CLIENT; //for now everything will be supported through this SM (until we add IEC)
+	//for now everything will be supported through this SM (until we add IEC)
+	type = ACCT_CC_CLIENT;
 
 	s = cdp_new_session(id,type);
 	if (s) {




More information about the sr-dev mailing list