diff --git a/usr.sbin/bluetooth/bthidd/client.c b/usr.sbin/bluetooth/bthidd/client.c index 27508ce82d56..ae0639374fc7 100644 --- a/usr.sbin/bluetooth/bthidd/client.c +++ b/usr.sbin/bluetooth/bthidd/client.c @@ -119,7 +119,8 @@ client_connect(bthid_server_p srv, int32_t fd) { bthid_session_p s; hid_device_p d; - int32_t error, len; + int32_t error; + socklen_t len; assert(srv != NULL); assert(fd >= 0); diff --git a/usr.sbin/bluetooth/bthidd/server.c b/usr.sbin/bluetooth/bthidd/server.c index 2ed2fe4efc1f..d76bd62664eb 100644 --- a/usr.sbin/bluetooth/bthidd/server.c +++ b/usr.sbin/bluetooth/bthidd/server.c @@ -223,7 +223,8 @@ server_accept(bthid_server_p srv, int32_t fd) bthid_session_p s; hid_device_p d; struct sockaddr_l2cap l2addr; - int32_t len, new_fd; + int32_t new_fd; + socklen_t len; len = sizeof(l2addr); if ((new_fd = accept(fd, (struct sockaddr *) &l2addr, &len)) < 0) { diff --git a/usr.sbin/bluetooth/hcsecd/hcsecd.c b/usr.sbin/bluetooth/hcsecd/hcsecd.c index a1b72a3b34ae..d83e04b4486e 100644 --- a/usr.sbin/bluetooth/hcsecd/hcsecd.c +++ b/usr.sbin/bluetooth/hcsecd/hcsecd.c @@ -65,7 +65,8 @@ static void usage int main(int argc, char *argv[]) { - int n, detach, sock, size; + int n, detach, sock; + socklen_t size; struct sigaction sa; struct sockaddr_hci addr; struct ng_btsocket_hci_raw_filter filter; diff --git a/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c b/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c index 79c48c1fd1be..7a879bbfb390 100644 --- a/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c +++ b/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c @@ -301,8 +301,8 @@ main(int argc, char *argv[]) } for (done = 0; !done; ) { - int len = sizeof(sock_addr); - int s1 = accept(s, (struct sockaddr *) &sock_addr, &len); + socklen_t len = sizeof(sock_addr); + int s1 = accept(s, (struct sockaddr *) &sock_addr, &len); if (s1 < 0) { syslog(LOG_ERR, "Could not accept connection " \ diff --git a/usr.sbin/bluetooth/sdpd/server.c b/usr.sbin/bluetooth/sdpd/server.c index 72f529a62d40..bef7e3ee8d13 100644 --- a/usr.sbin/bluetooth/sdpd/server.c +++ b/usr.sbin/bluetooth/sdpd/server.c @@ -66,7 +66,8 @@ server_init(server_p srv, char const *control) { struct sockaddr_un un; struct sockaddr_l2cap l2; - int32_t unsock, l2sock, size; + int32_t unsock, l2sock; + socklen_t size; uint16_t imtu; assert(srv != NULL); @@ -289,8 +290,9 @@ static void server_accept_client(server_p srv, int32_t fd) { uint8_t *rsp = NULL; - int32_t cfd, size, priv; + int32_t cfd, priv; uint16_t omtu; + socklen_t size; do { cfd = accept(fd, NULL, NULL);