diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-12-23 03:46:04 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-12-23 03:46:04 +0100 |
commit | e1d77b681efa7ca4a42be3d6189cbe477f9cd264 (patch) | |
tree | 3ce27ba025b1555d05b274ae40638e8ed0cfad0e | |
parent | b75f83543ab6385e56adc5efe0110b94a9a9555e (diff) |
Use different variables for option and read buffer lengths
-rw-r--r-- | lib/hci.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |