Diff between 44658f11cafb311703783d6e225c020b61fda54f and 0284bf0b1c5c2239a830f4f69461c61eada633a5

Changed Files

File Additions Deletions Status
src/adapter.c +1 -4 modified

Full Patch

diff --git a/src/adapter.c b/src/adapter.c
index 160a6ca..cef2561 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -8940,7 +8940,6 @@ static void read_commands_complete(uint8_t status, uint16_t length,
 {
 	const struct mgmt_rp_read_commands *rp = param;
 	uint16_t num_commands, num_events;
-	const uint16_t *opcode;
 	size_t expected_len;
 	int i;
 
@@ -8970,10 +8969,8 @@ static void read_commands_complete(uint8_t status, uint16_t length,
 		return;
 	}
 
-	opcode = rp->opcodes;
-
 	for (i = 0; i < num_commands; i++) {
-		uint16_t op = get_le16(opcode++);
+		uint16_t op = get_le16(rp->opcodes + i);
 
 		if (op == MGMT_OP_ADD_DEVICE) {
 			DBG("enabling kernel-side connection control");