Initialize variables

Fix compiler warnings and potential bug

pn53x.c:1526:19: warning: The right operand of '<' is a garbage value
    for (i = 0; i < sz; i++) {
                  ^ ~~
pn53x.c:1621:19: warning: The right operand of '<' is a garbage value
    for (i = 0; i < sz; i++) {
                  ^ ~~
This commit is contained in:
Ludovic Rousseau 2013-03-02 13:08:03 +01:00
parent abf54c7598
commit aee56b9255

View file

@ -1456,7 +1456,7 @@ pn53x_initiator_transceive_bits_timed(struct nfc_device *pnd, const uint8_t *pbt
(void) pbtTxPar; (void) pbtTxPar;
(void) pbtRxPar; (void) pbtRxPar;
uint16_t i; uint16_t i;
uint8_t sz; uint8_t sz = 0;
int res = 0; int res = 0;
size_t szRxBits = 0; size_t szRxBits = 0;
@ -1555,7 +1555,7 @@ int
pn53x_initiator_transceive_bytes_timed(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRx, uint32_t *cycles) pn53x_initiator_transceive_bytes_timed(struct nfc_device *pnd, const uint8_t *pbtTx, const size_t szTx, uint8_t *pbtRx, const size_t szRx, uint32_t *cycles)
{ {
uint16_t i; uint16_t i;
uint8_t sz; uint8_t sz = 0;
int res = 0; int res = 0;
// We can not just send bytes without parity while the PN53X expects we handled them // We can not just send bytes without parity while the PN53X expects we handled them