summaryrefslogtreecommitdiff
path: root/res/res_rtp_asterisk.c
diff options
context:
space:
mode:
authorGeorge Joseph <gjoseph@digium.com>2016-06-22 12:41:57 -0600
committerGeorge Joseph <gjoseph@digium.com>2016-06-22 13:46:41 -0500
commitd293ead07726cd8cee8b5277c2536db7d50cbabd (patch)
treeec6f8a537c2f62fb4357a6516eb9861f71554de0 /res/res_rtp_asterisk.c
parentaec09d9c09f04c886b15c731faee9f8d4fb9833f (diff)
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
Diffstat (limited to 'res/res_rtp_asterisk.c')
-rw-r--r--res/res_rtp_asterisk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 119e45d87..79aab1697 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -540,8 +540,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;
}