Change in ...osmo-sip-connector[master]: coverity: Address issue found by coverity

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Aug 9 11:11:09 UTC 2019


pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-sip-connector/+/15143 )

Change subject: coverity: Address issue found by coverity
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.osmocom.org/#/c/15143/4/src/mncc.c 
File src/mncc.c:

https://gerrit.osmocom.org/#/c/15143/4/src/mncc.c@205 
PS4, Line 205: static void update_rtp(struct call_leg *_leg) {
No need to change it now, but this function would be a lot simpler by using a switch:

static void update_rtp(struct call_leg *_leg) {
	struct mncc_call_leg *leg;

	LOGP(DMNCC, LOGL_DEBUG, "UPDATE RTP for LEG Type (%u)\n", _leg->type);
        switch (_leg->type) {
	case: CALL_TYPE_MNCC:
		 leg = (struct mncc_call_leg *) _leg;
		struct call_leg *other = call_leg_other(&leg->base);
		if (!other)
			goto ret_release;
                break;
        case CALL_TYPE_SIP:
                leg = (struct mncc_call_leg *) call_leg_other(_leg);
		if (!leg)
			goto ret_release;
                break;
        default:
               OSMO_ASSERT(false);
        }
      
        send_rtp_connect(leg, other);
        return;
ret_release:
	LOGP(DMNCC, LOGL_ERROR, "Failed to find other leg.\n");
        _leg->release_call(_leg);
}


https://gerrit.osmocom.org/#/c/15143/4/src/mncc.c@228 
PS4, Line 228: 		_leg->release_call(_leg);
Wrong indentation here.



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-sip-connector/+/15143
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-Change-Id: I6f1f26533a25c93f243090bc02f1bc83b9108d42
Gerrit-Change-Number: 15143
Gerrit-PatchSet: 4
Gerrit-Owner: keith <keith at rhizomatica.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: keith <keith at rhizomatica.org>
Gerrit-CC: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Aug 2019 11:11:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190809/3cb9e0f4/attachment.htm>


More information about the gerrit-log mailing list