From e1d77b681efa7ca4a42be3d6189cbe477f9cd264 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 23 Dec 2008 03:46:04 +0100 Subject: Use different variables for option and read buffer lengths --- lib/hci.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/hci.c b/lib/hci.c index 03974c0c..148f121b 100644 --- a/lib/hci.c +++ b/lib/hci.c @@ -988,12 +988,12 @@ int hci_send_req(int dd, struct hci_request *r, int to) unsigned char buf[HCI_MAX_EVENT_SIZE], *ptr; uint16_t opcode = htobs(cmd_opcode_pack(r->ogf, r->ocf)); struct hci_filter nf, of; - socklen_t len; + socklen_t olen; hci_event_hdr *hdr; int err, try; - len = sizeof(of); - if (getsockopt(dd, SOL_HCI, HCI_FILTER, &of, &len) < 0) + olen = sizeof(of); + if (getsockopt(dd, SOL_HCI, HCI_FILTER, &of, &olen) < 0) return -1; hci_filter_clear(&nf); @@ -1014,6 +1014,7 @@ int hci_send_req(int dd, struct hci_request *r, int to) evt_cmd_status *cs; evt_remote_name_req_complete *rn; remote_name_req_cp *cp; + int len; if (to) { struct pollfd p; -- cgit