summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-05-23 12:31:20 +0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-05 07:34:06 +0400
commit9b3b44604ac8e06d299718c5d0fa0b91b675ae0b (patch)
treeb079fbe2b97d297f19c5d4c24560169157ac3db9 /net/bluetooth/hci_core.c
parenta6c511c636848f871f5b7aef38e25e5b894b3b48 (diff)
downloadlinux-9b3b44604ac8e06d299718c5d0fa0b91b675ae0b.tar.xz
Bluetooth: Use defined link key size
Remove magic number with defined link key size. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 0ed4edf0f77b..027257d4b52a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1291,7 +1291,7 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
}
bacpy(&key->bdaddr, bdaddr);
- memcpy(key->val, val, 16);
+ memcpy(key->val, val, HCI_LINK_KEY_SIZE);
key->pin_len = pin_len;
if (type == HCI_LK_CHANGED_COMBINATION)