Browse Source

MT#55283 __get_media: NULL assigned but not used

The `med` is assigned to NULL, which however
doesn't serve any purpose. To fix this defect report,
just remove the redundant assignment.

Fixes the:

*** CID 1600020:  Code maintainability issues  (UNUSED_VALUE)
/daemon/call.c: 690 in __get_media()
684                     med = g_hash_table_lookup(ml->media_ids, &sp->media_id);
685                     if (med) {
686                             if (med->type_id == sp->type_id)
687                                     return med;
688                             ilogs(ice, LOG_WARN, "Ignoring media ID '" STR_FORMAT "' as media type doesn't match. "
689                                             "Was media ID changed?", STR_FMT(&sp->media_id));
>>>     CID 1600020:  Code maintainability issues  (UNUSED_VALUE)
>>>     Assigning value "NULL" to "med" here, but that stored value is overwritten before it can be used.
690                             med = NULL;
691                     }
692                     if (flags->trickle_ice)
693                             ilogs(ice, LOG_ERR, "Received trickle ICE SDP fragment with unknown media ID '"
694                                             STR_FORMAT "'",
695                                             STR_FMT(&sp->media_id));

Change-Id: I9871be9cab8928a8e5b6ad2a5e403b9ee3d44295
mr13.0
Donat Zenichev 1 year ago
parent
commit
a6719e9329
1 changed files with 0 additions and 1 deletions
  1. +0
    -1
      daemon/call.c

+ 0
- 1
daemon/call.c View File

@ -687,7 +687,6 @@ static struct call_media *__get_media(struct call_monologue *ml, const struct st
return med;
ilogs(ice, LOG_WARN, "Ignoring media ID '" STR_FORMAT "' as media type doesn't match. "
"Was media ID changed?", STR_FMT(&sp->media_id));
med = NULL;
}
if (flags->trickle_ice)
ilogs(ice, LOG_ERR, "Received trickle ICE SDP fragment with unknown media ID '"


Loading…
Cancel
Save