From: Waldemar Rymarkiewicz Date: Wed, 1 Jun 2011 15:28:47 +0000 (+0200) Subject: Bluetooth: Remove a magic number X-Git-Tag: MMI-PSA29.97-13-9~18350^2~12^2~42^2~467 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=24718ca5eeb6d36a4a78deb34a2d50e4017bbd4a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Bluetooth: Remove a magic number Signed-off-by: Waldemar Rymarkiewicz Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 89bc36ae3120..54154235b4a7 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1143,7 +1143,7 @@ static int pin_code_reply(struct sock *sk, u16 index, unsigned char *data, bacpy(&reply.bdaddr, &cp->bdaddr); reply.pin_len = cp->pin_len; - memcpy(reply.pin_code, cp->pin_code, 16); + memcpy(reply.pin_code, cp->pin_code, sizeof(reply.pin_code)); err = hci_send_cmd(hdev, HCI_OP_PIN_CODE_REPLY, sizeof(reply), &reply); if (err < 0)