pn53x: avoid warning about uninitialized value (false positive)

pn53x.c:1746:15: warning: Function call argument is an uninitialized value
    *cycles = __pn53x_get_timer(pnd, pbtTxRaw[szTx + 1]);
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Philippe Teuwen 2017-02-18 17:29:57 +01:00
parent 05220537ea
commit f2c264d4ae

View file

@ -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);