Skip to content

Commit

Permalink
Silly typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ollie1400 committed Nov 14, 2020
1 parent 0afeb2f commit 2fcda9c
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 @@ -427,7 +427,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 @@ -470,7 +470,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 2fcda9c

Please sign in to comment.