Skip to content

Commit

Permalink
pn53x: avoid warning about uninitialized value (false positive)
Browse files Browse the repository at this point in the history
pn53x.c:1746:15: warning: Function call argument is an uninitialized value
    *cycles = __pn53x_get_timer(pnd, pbtTxRaw[szTx + 1]);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Loading branch information
doegox committed Feb 18, 2017
1 parent 0522053 commit f2c264d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libnfc/chips/pn53x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1733,7 +1733,7 @@ pn53x_initiator_transceive_bytes_timed(struct nfc_device *pnd, const uint8_t *pb
if (pnd->bCrc) {
// We've to compute CRC ourselves to know last byte actually sent
uint8_t *pbtTxRaw;
pbtTxRaw = (uint8_t *) malloc(szTx + 2);
pbtTxRaw = (uint8_t *) calloc(szTx + 2, 1);
if (!pbtTxRaw)
return NFC_ESOFT;
memcpy(pbtTxRaw, pbtTx, szTx);
Expand Down

0 comments on commit f2c264d

Please sign in to comment.