Commit 1048565e authored by Vittorio Giovara's avatar Vittorio Giovara

pjsip: drop a few useless unsigned comparisons

Change-Id: Ia2c2320b7ed55f3ff75bff790c74f1ef3450e468
Refs: #46066
parent a119f354
......@@ -851,8 +851,7 @@ PJ_DEF(pj_status_t) pj_ice_strans_init_ice(pj_ice_strans *ice_st,
* type priority to ICE session so that SRFLX candidates will get
* checked first.
*/
if (ice_st->comp[0]->default_cand >= 0 &&
ice_st->comp[0]->cand_list[ice_st->comp[0]->default_cand].type
if (ice_st->comp[0]->cand_list[ice_st->comp[0]->default_cand].type
== PJ_ICE_CAND_TYPE_SRFLX)
{
pj_ice_sess_set_prefs(ice_st->ice, srflx_pref_table);
......
......@@ -99,7 +99,7 @@ pj_status_t gui_start(gui_menu *menu)
choice = menu;
while (*p && *p!='\r' && *p!='\n') {
unsigned d = (*p - '0');
if (d < 0 || d >= choice->submenu_cnt) {
if (d >= choice->submenu_cnt) {
puts("Invalid selection");
choice = NULL;
break;
......
......@@ -213,8 +213,6 @@ PJ_DEF(pj_status_t) pjsip_regc_get_info( pjsip_regc *regc,
info->next_reg = 0;
else if (regc->auto_reg == 0)
info->next_reg = 0;
else if (regc->expires < 0)
info->next_reg = regc->expires;
else {
pj_time_val now, next_reg;
......
......@@ -173,11 +173,6 @@ static void udp_on_read_complete( pj_ioqueue_key_t *key,
pjsip_tpmgr_receive_packet(rdata->tp_info.transport->tpmgr,
rdata);
if (size_eaten < 0) {
pj_assert(!"It shouldn't happen!");
size_eaten = rdata->pkt_info.len;
}
/* Since this is UDP, the whole buffer is the message. */
rdata->pkt_info.len = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment