[SVN-Commit] r1535 - in trunk: mail/thunderbird/files www/firefox-esr/files www/firefox-nightly/files www/firefox/files www/libxul/files www/seamonkey/files
svn-freebsd-gecko at chruetertee.ch
svn-freebsd-gecko at chruetertee.ch
Wed Mar 5 03:19:46 UTC 2014
Author: jbeich
Date: Wed Mar 5 03:19:31 2014
New Revision: 1535
Log:
more style from upstream
Modified:
trunk/mail/thunderbird/files/patch-bug893397
trunk/www/firefox-esr/files/patch-bug893397
trunk/www/firefox-nightly/files/patch-bug893397
trunk/www/firefox/files/patch-bug893397
trunk/www/libxul/files/patch-bug893397
trunk/www/seamonkey/files/patch-bug893397
Modified: trunk/mail/thunderbird/files/patch-bug893397
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug893397 Tue Mar 4 04:33:37 2014 (r1534)
+++ trunk/mail/thunderbird/files/patch-bug893397 Wed Mar 5 03:19:31 2014 (r1535)
@@ -31,7 +31,7 @@
index 0000000..80d4cb6
--- /dev/null
+++ mozilla/netwerk/wifi/nsWifiScannerFreeBSD.cpp
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,167 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -62,37 +62,37 @@
+{
+ // get list of interfaces
+ struct ifaddrs *ifal;
-+ if (getifaddrs(&ifal) < 0)
++ if (getifaddrs(&ifal) < 0) {
+ return NS_ERROR_FAILURE;
++ }
+
+ accessPoints.Clear();
+
+ // loop through the interfaces
+ nsresult rv = NS_ERROR_FAILURE;
+ struct ifaddrs *ifa;
-+ char *dupn = NULL;
+ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+ struct ifreq ifr;
-+ memset(&ifr, 0, sizeof(ifr));
-+
-+ // list can contain duplicates, so ignore those
-+ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
++ // limit to one interface per address
++ if (ifa->ifa_addr->sa_family != AF_LINK) {
+ continue;
-+ dupn = ifa->ifa_name;
++ }
+
+ // store interface name in socket structure
++ struct ifreq ifr;
++ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
+ ifr.ifr_addr.sa_family = AF_LOCAL;
+
+ // open socket to interface
+ int s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0);
-+ if (s < 0)
++ if (s < 0) {
+ continue;
++ }
+
+ // clear interface media structure
+ struct ifmediareq ifmr;
-+ (void) memset(&ifmr, 0, sizeof(ifmr));
-+ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
++ memset(&ifmr, 0, sizeof(ifmr));
++ strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
+
+ // get interface media information
+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
@@ -109,8 +109,8 @@
+ // perform WiFi scan
+ struct ieee80211req i802r;
+ char iscanbuf[32*1024];
-+ (void) memset(&i802r, 0, sizeof(i802r));
-+ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
++ memset(&i802r, 0, sizeof(i802r));
++ strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
+ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
+ i802r.i_data = iscanbuf;
+ i802r.i_len = sizeof(iscanbuf);
@@ -135,8 +135,7 @@
+ if (isr->isr_meshid_len) {
+ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
+ idlen = isr->isr_meshid_len;
-+ }
-+ else {
++ } else {
+ id = vsr + isr->isr_ie_off;
+ idlen = isr->isr_ssid_len;
+ }
Modified: trunk/www/firefox-esr/files/patch-bug893397
==============================================================================
--- trunk/www/firefox-esr/files/patch-bug893397 Tue Mar 4 04:33:37 2014 (r1534)
+++ trunk/www/firefox-esr/files/patch-bug893397 Wed Mar 5 03:19:31 2014 (r1535)
@@ -31,7 +31,7 @@
index 0000000..80d4cb6
--- /dev/null
+++ netwerk/wifi/nsWifiScannerFreeBSD.cpp
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,167 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -62,37 +62,37 @@
+{
+ // get list of interfaces
+ struct ifaddrs *ifal;
-+ if (getifaddrs(&ifal) < 0)
++ if (getifaddrs(&ifal) < 0) {
+ return NS_ERROR_FAILURE;
++ }
+
+ accessPoints.Clear();
+
+ // loop through the interfaces
+ nsresult rv = NS_ERROR_FAILURE;
+ struct ifaddrs *ifa;
-+ char *dupn = NULL;
+ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+ struct ifreq ifr;
-+ memset(&ifr, 0, sizeof(ifr));
-+
-+ // list can contain duplicates, so ignore those
-+ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
++ // limit to one interface per address
++ if (ifa->ifa_addr->sa_family != AF_LINK) {
+ continue;
-+ dupn = ifa->ifa_name;
++ }
+
+ // store interface name in socket structure
++ struct ifreq ifr;
++ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
+ ifr.ifr_addr.sa_family = AF_LOCAL;
+
+ // open socket to interface
+ int s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0);
-+ if (s < 0)
++ if (s < 0) {
+ continue;
++ }
+
+ // clear interface media structure
+ struct ifmediareq ifmr;
-+ (void) memset(&ifmr, 0, sizeof(ifmr));
-+ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
++ memset(&ifmr, 0, sizeof(ifmr));
++ strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
+
+ // get interface media information
+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
@@ -109,8 +109,8 @@
+ // perform WiFi scan
+ struct ieee80211req i802r;
+ char iscanbuf[32*1024];
-+ (void) memset(&i802r, 0, sizeof(i802r));
-+ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
++ memset(&i802r, 0, sizeof(i802r));
++ strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
+ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
+ i802r.i_data = iscanbuf;
+ i802r.i_len = sizeof(iscanbuf);
@@ -135,8 +135,7 @@
+ if (isr->isr_meshid_len) {
+ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
+ idlen = isr->isr_meshid_len;
-+ }
-+ else {
++ } else {
+ id = vsr + isr->isr_ie_off;
+ idlen = isr->isr_ssid_len;
+ }
Modified: trunk/www/firefox-nightly/files/patch-bug893397
==============================================================================
--- trunk/www/firefox-nightly/files/patch-bug893397 Tue Mar 4 04:33:37 2014 (r1534)
+++ trunk/www/firefox-nightly/files/patch-bug893397 Wed Mar 5 03:19:31 2014 (r1535)
@@ -31,7 +31,7 @@
index 0000000..80d4cb6
--- /dev/null
+++ netwerk/wifi/nsWifiScannerFreeBSD.cpp
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,167 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -62,37 +62,37 @@
+{
+ // get list of interfaces
+ struct ifaddrs *ifal;
-+ if (getifaddrs(&ifal) < 0)
++ if (getifaddrs(&ifal) < 0) {
+ return NS_ERROR_FAILURE;
++ }
+
+ accessPoints.Clear();
+
+ // loop through the interfaces
+ nsresult rv = NS_ERROR_FAILURE;
+ struct ifaddrs *ifa;
-+ char *dupn = NULL;
+ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+ struct ifreq ifr;
-+ memset(&ifr, 0, sizeof(ifr));
-+
-+ // list can contain duplicates, so ignore those
-+ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
++ // limit to one interface per address
++ if (ifa->ifa_addr->sa_family != AF_LINK) {
+ continue;
-+ dupn = ifa->ifa_name;
++ }
+
+ // store interface name in socket structure
++ struct ifreq ifr;
++ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
+ ifr.ifr_addr.sa_family = AF_LOCAL;
+
+ // open socket to interface
+ int s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0);
-+ if (s < 0)
++ if (s < 0) {
+ continue;
++ }
+
+ // clear interface media structure
+ struct ifmediareq ifmr;
-+ (void) memset(&ifmr, 0, sizeof(ifmr));
-+ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
++ memset(&ifmr, 0, sizeof(ifmr));
++ strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
+
+ // get interface media information
+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
@@ -109,8 +109,8 @@
+ // perform WiFi scan
+ struct ieee80211req i802r;
+ char iscanbuf[32*1024];
-+ (void) memset(&i802r, 0, sizeof(i802r));
-+ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
++ memset(&i802r, 0, sizeof(i802r));
++ strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
+ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
+ i802r.i_data = iscanbuf;
+ i802r.i_len = sizeof(iscanbuf);
@@ -135,8 +135,7 @@
+ if (isr->isr_meshid_len) {
+ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
+ idlen = isr->isr_meshid_len;
-+ }
-+ else {
++ } else {
+ id = vsr + isr->isr_ie_off;
+ idlen = isr->isr_ssid_len;
+ }
Modified: trunk/www/firefox/files/patch-bug893397
==============================================================================
--- trunk/www/firefox/files/patch-bug893397 Tue Mar 4 04:33:37 2014 (r1534)
+++ trunk/www/firefox/files/patch-bug893397 Wed Mar 5 03:19:31 2014 (r1535)
@@ -31,7 +31,7 @@
index 0000000..80d4cb6
--- /dev/null
+++ netwerk/wifi/nsWifiScannerFreeBSD.cpp
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,167 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -62,37 +62,37 @@
+{
+ // get list of interfaces
+ struct ifaddrs *ifal;
-+ if (getifaddrs(&ifal) < 0)
++ if (getifaddrs(&ifal) < 0) {
+ return NS_ERROR_FAILURE;
++ }
+
+ accessPoints.Clear();
+
+ // loop through the interfaces
+ nsresult rv = NS_ERROR_FAILURE;
+ struct ifaddrs *ifa;
-+ char *dupn = NULL;
+ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+ struct ifreq ifr;
-+ memset(&ifr, 0, sizeof(ifr));
-+
-+ // list can contain duplicates, so ignore those
-+ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
++ // limit to one interface per address
++ if (ifa->ifa_addr->sa_family != AF_LINK) {
+ continue;
-+ dupn = ifa->ifa_name;
++ }
+
+ // store interface name in socket structure
++ struct ifreq ifr;
++ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
+ ifr.ifr_addr.sa_family = AF_LOCAL;
+
+ // open socket to interface
+ int s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0);
-+ if (s < 0)
++ if (s < 0) {
+ continue;
++ }
+
+ // clear interface media structure
+ struct ifmediareq ifmr;
-+ (void) memset(&ifmr, 0, sizeof(ifmr));
-+ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
++ memset(&ifmr, 0, sizeof(ifmr));
++ strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
+
+ // get interface media information
+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
@@ -109,8 +109,8 @@
+ // perform WiFi scan
+ struct ieee80211req i802r;
+ char iscanbuf[32*1024];
-+ (void) memset(&i802r, 0, sizeof(i802r));
-+ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
++ memset(&i802r, 0, sizeof(i802r));
++ strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
+ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
+ i802r.i_data = iscanbuf;
+ i802r.i_len = sizeof(iscanbuf);
@@ -135,8 +135,7 @@
+ if (isr->isr_meshid_len) {
+ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
+ idlen = isr->isr_meshid_len;
-+ }
-+ else {
++ } else {
+ id = vsr + isr->isr_ie_off;
+ idlen = isr->isr_ssid_len;
+ }
Modified: trunk/www/libxul/files/patch-bug893397
==============================================================================
--- trunk/www/libxul/files/patch-bug893397 Tue Mar 4 04:33:37 2014 (r1534)
+++ trunk/www/libxul/files/patch-bug893397 Wed Mar 5 03:19:31 2014 (r1535)
@@ -31,7 +31,7 @@
index 0000000..80d4cb6
--- /dev/null
+++ netwerk/wifi/nsWifiScannerFreeBSD.cpp
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,167 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -62,37 +62,37 @@
+{
+ // get list of interfaces
+ struct ifaddrs *ifal;
-+ if (getifaddrs(&ifal) < 0)
++ if (getifaddrs(&ifal) < 0) {
+ return NS_ERROR_FAILURE;
++ }
+
+ accessPoints.Clear();
+
+ // loop through the interfaces
+ nsresult rv = NS_ERROR_FAILURE;
+ struct ifaddrs *ifa;
-+ char *dupn = NULL;
+ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+ struct ifreq ifr;
-+ memset(&ifr, 0, sizeof(ifr));
-+
-+ // list can contain duplicates, so ignore those
-+ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
++ // limit to one interface per address
++ if (ifa->ifa_addr->sa_family != AF_LINK) {
+ continue;
-+ dupn = ifa->ifa_name;
++ }
+
+ // store interface name in socket structure
++ struct ifreq ifr;
++ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
+ ifr.ifr_addr.sa_family = AF_LOCAL;
+
+ // open socket to interface
+ int s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0);
-+ if (s < 0)
++ if (s < 0) {
+ continue;
++ }
+
+ // clear interface media structure
+ struct ifmediareq ifmr;
-+ (void) memset(&ifmr, 0, sizeof(ifmr));
-+ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
++ memset(&ifmr, 0, sizeof(ifmr));
++ strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
+
+ // get interface media information
+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
@@ -109,8 +109,8 @@
+ // perform WiFi scan
+ struct ieee80211req i802r;
+ char iscanbuf[32*1024];
-+ (void) memset(&i802r, 0, sizeof(i802r));
-+ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
++ memset(&i802r, 0, sizeof(i802r));
++ strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
+ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
+ i802r.i_data = iscanbuf;
+ i802r.i_len = sizeof(iscanbuf);
@@ -135,8 +135,7 @@
+ if (isr->isr_meshid_len) {
+ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
+ idlen = isr->isr_meshid_len;
-+ }
-+ else {
++ } else {
+ id = vsr + isr->isr_ie_off;
+ idlen = isr->isr_ssid_len;
+ }
Modified: trunk/www/seamonkey/files/patch-bug893397
==============================================================================
--- trunk/www/seamonkey/files/patch-bug893397 Tue Mar 4 04:33:37 2014 (r1534)
+++ trunk/www/seamonkey/files/patch-bug893397 Wed Mar 5 03:19:31 2014 (r1535)
@@ -31,7 +31,7 @@
index 0000000..80d4cb6
--- /dev/null
+++ mozilla/netwerk/wifi/nsWifiScannerFreeBSD.cpp
-@@ -0,0 +1,168 @@
+@@ -0,0 +1,167 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
@@ -62,37 +62,37 @@
+{
+ // get list of interfaces
+ struct ifaddrs *ifal;
-+ if (getifaddrs(&ifal) < 0)
++ if (getifaddrs(&ifal) < 0) {
+ return NS_ERROR_FAILURE;
++ }
+
+ accessPoints.Clear();
+
+ // loop through the interfaces
+ nsresult rv = NS_ERROR_FAILURE;
+ struct ifaddrs *ifa;
-+ char *dupn = NULL;
+ for (ifa = ifal; ifa; ifa = ifa->ifa_next) {
-+ struct ifreq ifr;
-+ memset(&ifr, 0, sizeof(ifr));
-+
-+ // list can contain duplicates, so ignore those
-+ if (dupn != NULL && strcmp(dupn, ifa->ifa_name) == 0)
++ // limit to one interface per address
++ if (ifa->ifa_addr->sa_family != AF_LINK) {
+ continue;
-+ dupn = ifa->ifa_name;
++ }
+
+ // store interface name in socket structure
++ struct ifreq ifr;
++ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
+ ifr.ifr_addr.sa_family = AF_LOCAL;
+
+ // open socket to interface
+ int s = socket(ifr.ifr_addr.sa_family, SOCK_DGRAM, 0);
-+ if (s < 0)
++ if (s < 0) {
+ continue;
++ }
+
+ // clear interface media structure
+ struct ifmediareq ifmr;
-+ (void) memset(&ifmr, 0, sizeof(ifmr));
-+ (void) strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
++ memset(&ifmr, 0, sizeof(ifmr));
++ strncpy(ifmr.ifm_name, ifa->ifa_name, sizeof(ifmr.ifm_name));
+
+ // get interface media information
+ if (ioctl(s, SIOCGIFMEDIA, (caddr_t)&ifmr) < 0) {
@@ -109,8 +109,8 @@
+ // perform WiFi scan
+ struct ieee80211req i802r;
+ char iscanbuf[32*1024];
-+ (void) memset(&i802r, 0, sizeof(i802r));
-+ (void) strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
++ memset(&i802r, 0, sizeof(i802r));
++ strncpy(i802r.i_name, ifa->ifa_name, sizeof(i802r.i_name));
+ i802r.i_type = IEEE80211_IOC_SCAN_RESULTS;
+ i802r.i_data = iscanbuf;
+ i802r.i_len = sizeof(iscanbuf);
@@ -135,8 +135,7 @@
+ if (isr->isr_meshid_len) {
+ id = vsr + isr->isr_ie_off + isr->isr_ssid_len;
+ idlen = isr->isr_meshid_len;
-+ }
-+ else {
++ } else {
+ id = vsr + isr->isr_ie_off;
+ idlen = isr->isr_ssid_len;
+ }
More information about the freebsd-gecko
mailing list