From: George Joseph Date: Wed, 22 Jun 2016 18:41:57 +0000 (-0600) Subject: res_rtp_asterisk: Fix a self-comparison identified by gcc 6 X-Git-Tag: certified/11.6-cert14-rc1~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F3259%2F2;p=thirdparty%2Fasterisk.git res_rtp_asterisk: Fix a self-comparison identified by gcc 6 gcc 6 caught a previously unidentified self-comparison in ice_candidate_cmp. Fixed it and re-ordered the predicates for better short-circuiting. ASTERISK-26140 #close Change-Id: I3da713c568e24064430257b3502fbdafd35af7a7 (cherry picked from commit 9548ccca0e56470c9a32360da73f687ae05376f5) --- diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c index f10dee8242..4bbbc86301 100644 --- a/res/res_rtp_asterisk.c +++ b/res/res_rtp_asterisk.c @@ -455,8 +455,8 @@ static int ice_candidate_cmp(void *obj, void *arg, int flags) if (strcmp(candidate1->foundation, candidate2->foundation) || candidate1->id != candidate2->id || - ast_sockaddr_cmp(&candidate1->address, &candidate2->address) || - candidate1->type != candidate1->type) { + candidate1->type != candidate2->type || + ast_sockaddr_cmp(&candidate1->address, &candidate2->address)) { return 0; }