diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2019-05-07 16:49:03 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2019-05-07 16:49:03 +0200 |
commit | acb2de0d82641ace502346ff5672ff7f28f4fccd (patch) | |
tree | 77756b2ad0c817fca460e422244a84820cd45ec0 /peripheral | |
parent | 0284bf0b1c5c2239a830f4f69461c61eada633a5 (diff) | |
download | bluez-acb2de0d82641ace502346ff5672ff7f28f4fccd.tar.gz |
peripheral: Walk rp->opcodes directly instead of interim variable
Diffstat (limited to 'peripheral')
-rw-r--r-- | peripheral/gap.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/peripheral/gap.c b/peripheral/gap.c index f659f7fef..52a7bed9b 100644 --- a/peripheral/gap.c +++ b/peripheral/gap.c @@ -471,7 +471,6 @@ static void read_commands_complete(uint8_t status, uint16_t len, const void *param, void *user_data) { const struct mgmt_rp_read_commands *rp = param; - const uint16_t *opcode; uint16_t num_commands; bool ext_index_list = false; int i; @@ -483,10 +482,9 @@ static void read_commands_complete(uint8_t status, uint16_t len, } num_commands = le16_to_cpu(rp->num_commands); - opcode = rp->opcodes; for (i = 0; i < num_commands; i++) { - uint16_t op = get_le16(opcode++); + uint16_t op = get_le16(rp->opcodes + 1); if (op == MGMT_OP_READ_EXT_INDEX_LIST) ext_index_list = true; |