Bug 861980 - Change sockopt length to be a socklen_t. r=echou, a=tef+
authorKyle Machulis <kyle@nonpolynomial.com>
Tue, 16 Apr 2013 14:54:00 -0700
changeset 119085 2a03e41195bc4c6ec003f674019014d04bff8408
parent 119084 a5a89b7510cc8ddfd0597e86debaae7cd8021ae5
child 119086 b1d335593453dd02153cab7761054e16f633f341
push id679
push userryanvm@gmail.com
push dateWed, 17 Apr 2013 20:21:22 +0000
reviewersechou, tef
bugs861980
milestone18.0
Bug 861980 - Change sockopt length to be a socklen_t. r=echou, a=tef+
dom/bluetooth/BluetoothUnixSocketConnector.cpp
--- a/dom/bluetooth/BluetoothUnixSocketConnector.cpp
+++ b/dom/bluetooth/BluetoothUnixSocketConnector.cpp
@@ -123,17 +123,18 @@ BluetoothUnixSocketConnector::SetUp(int 
       return false;
     }
   }
 
   /* Setting L2CAP socket options */
   if (mType == BluetoothSocketType::L2CAP ||
       mType == BluetoothSocketType::EL2CAP) {
     struct l2cap_options opts;
-    int optlen = sizeof(opts), err;
+    socklen_t optlen = sizeof(opts);
+    int err;
     err = getsockopt(aFd, SOL_L2CAP, L2CAP_OPTIONS, &opts, &optlen);
     if (!err) {
       /* setting MTU for [E]L2CAP */
       opts.omtu = opts.imtu = L2CAP_MAX_MTU;
 
       /* Enable ERTM for [E]L2CAP */
       if (mType == BluetoothSocketType::EL2CAP) {
         opts.flush_to = 0xffff; /* infinite */