Bug 1415249 - remove unused variables introduced in Bug 1408218. r=drno
authorMichael Froman <mfroman@mozilla.com>
Tue, 07 Nov 2017 09:28:47 -0600
changeset 694869 836cb7a4cc24cfaa73fa9470d35dec538d725d11
parent 694868 b2dd86a66344a2717f5cae026ac47247be525712
child 694870 11bf83133ab4da9ac5beeb8686b74d474cf14c1e
push id88276
push userbmo:lchang@mozilla.com
push dateWed, 08 Nov 2017 12:05:35 +0000
reviewersdrno
bugs1415249, 1408218
milestone58.0a1
Bug 1415249 - remove unused variables introduced in Bug 1408218. r=drno Two variables, contains_mac_based_ipv6 and contains_teredo_ipv6, were added that are set but never used. This will cause compiler warnings issues in the future. MozReview-Commit-ID: C5ZReH94RpM
media/mtransport/third_party/nICEr/src/stun/addrs.c
--- a/media/mtransport/third_party/nICEr/src/stun/addrs.c
+++ b/media/mtransport/third_party/nICEr/src/stun/addrs.c
@@ -367,33 +367,28 @@ nr_stun_is_duplicate_addr(nr_local_addr 
 
 int
 nr_stun_remove_duplicate_addrs(nr_local_addr addrs[], int remove_loopback, int remove_link_local, int *count)
 {
     int r, _status;
     nr_local_addr *tmp = 0;
     int i;
     int n;
-    int contains_mac_based_ipv6 = 0;
-    int contains_teredo_ipv6 = 0;
     int contains_regular_ipv6 = 0;
 
     tmp = RMALLOC(*count * sizeof(*tmp));
     if (!tmp)
         ABORT(R_NO_MEMORY);
 
     for (i = 0; i < *count; ++i) {
-        if (nr_transport_addr_is_mac_based(&addrs[i].addr)) {
-            contains_mac_based_ipv6 = 1;
+        if (nr_transport_addr_is_teredo(&addrs[i].addr)) {
+            addrs[i].interface.type |= NR_INTERFACE_TYPE_TEREDO;
         }
-        else if (nr_transport_addr_is_teredo(&addrs[i].addr)) {
-            addrs[i].interface.type |= NR_INTERFACE_TYPE_TEREDO;
-            contains_teredo_ipv6 = 1;
-        }
-        else if (addrs[i].addr.ip_version == NR_IPV6) {
+        else if (addrs[i].addr.ip_version == NR_IPV6 &&
+                 !nr_transport_addr_is_mac_based(&addrs[i].addr)) {
             contains_regular_ipv6 = 1;
         }
     }
 
     n = 0;
     for (i = 0; i < *count; ++i) {
         if (nr_stun_is_duplicate_addr(tmp, n, &addrs[i])) {
             /* skip addrs[i], it's a duplicate */