Skip to content

Commit

Permalink
Silly typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ollie1400 committed Jun 26, 2022
1 parent 039df0a commit 509dbaf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utility/HCI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ int HCIClass::sendAclPkt(uint16_t handle, uint8_t cid, uint8_t plen, void* data)
uint16_t cid;
} aclHdr = { HCI_ACLDATA_PKT, handle, uint8_t(plen + 4), plen, cid };

uint8_t *txBuffer = uint8_t*malloc(sizeof(aclHdr) + plen);
uint8_t* txBuffer = (uint8_t*)malloc(sizeof(aclHdr) + plen);
memcpy(txBuffer, &aclHdr, sizeof(aclHdr));
memcpy(&txBuffer[sizeof(aclHdr)], data, plen);

Expand Down Expand Up @@ -681,7 +681,7 @@ int HCIClass::sendCommand(uint16_t opcode, uint8_t plen, void* parameters)
uint8_t plen;
} pktHdr = {HCI_COMMAND_PKT, opcode, plen};

uint8_t *txBuffer = uint8_t*malloc(sizeof(pktHdr) + plen);
uint8_t* txBuffer = (uint8_t*)malloc(sizeof(pktHdr) + plen);
memcpy(txBuffer, &pktHdr, sizeof(pktHdr));
memcpy(&txBuffer[sizeof(pktHdr)], parameters, plen);

Expand Down

0 comments on commit 509dbaf

Please sign in to comment.