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 443893 836cb7a4cc24cfaa73fa9470d35dec538d725d11
parent 443892 b2dd86a66344a2717f5cae026ac47247be525712
child 443894 11bf83133ab4da9ac5beeb8686b74d474cf14c1e
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdrno
bugs1415249, 1408218
milestone58.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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 */