]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Bluetooth: remove magic offset and size
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>
Thu, 20 Oct 2011 14:02:44 +0000 (17:02 +0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Tue, 1 Nov 2011 16:08:35 +0000 (14:08 -0200)
make code readable by removing magic numbers

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/l2cap_core.c

index 4f169c51fc1f422d9b37d3c025922dbfed92fb5a..ed7c0ba28ead9acbdb54a848e2e061eac0596ef9 100644 (file)
@@ -3021,7 +3021,7 @@ static inline int l2cap_information_req(struct l2cap_conn *conn, struct l2cap_cm
                struct l2cap_info_rsp *rsp = (struct l2cap_info_rsp *) buf;
                rsp->type   = cpu_to_le16(L2CAP_IT_FIXED_CHAN);
                rsp->result = cpu_to_le16(L2CAP_IR_SUCCESS);
-               memcpy(buf + 4, l2cap_fixed_chan, 8);
+               memcpy(rsp->data, l2cap_fixed_chan, sizeof(l2cap_fixed_chan));
                l2cap_send_cmd(conn, cmd->ident,
                                        L2CAP_INFO_RSP, sizeof(buf), buf);
        } else {