rename codecs_cmp() to codecs_same()

The name 'cmp' implies a return value of -1, 0, 1 to indicate smaller, match or
larger. Since this function returns bool, it should not be named with 'cmp'.

Change-Id: I2d41b1a32300e295551e85d3f9ab82dd2b0e86b8
This commit is contained in:
Neels Hofmeyr 2019-08-09 00:51:21 +02:00
parent 50e52e45f9
commit 782d607962
1 changed files with 2 additions and 2 deletions

View File

@ -352,7 +352,7 @@ int mgcp_codec_decide(struct mgcp_conn_rtp *conn)
/* Compare two codecs, all parameters must match up, except for the payload type
* number. */
static bool codecs_cmp(struct mgcp_rtp_codec *codec_a, struct mgcp_rtp_codec *codec_b)
static bool codecs_same(struct mgcp_rtp_codec *codec_a, struct mgcp_rtp_codec *codec_b)
{
if (codec_a->rate != codec_b->rate)
return false;
@ -406,7 +406,7 @@ int mgcp_codec_pt_translate(struct mgcp_conn_rtp *conn_src, struct mgcp_conn_rtp
codecs_assigned = rtp_dst->codecs_assigned;
OSMO_ASSERT(codecs_assigned <= MGCP_MAX_CODECS);
for (i = 0; i < codecs_assigned; i++) {
if (codecs_cmp(codec_src, &rtp_dst->codecs[i])) {
if (codecs_same(codec_src, &rtp_dst->codecs[i])) {
codec_dst = &rtp_dst->codecs[i];
break;
}