From 36751e15b8ac7a0ed5809385645150ffaaf114d1 Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 14 Oct 2006 15:22:36 +0000 Subject: - remove prototypes for already-removed _register() functions from headers - automatically define LIBRFID_STATIC if LIBRFID_FIRMWARE is set - remove any references to printf/snprintf - remove bogus free() in 14443b_init git-svn-id: https://svn.gnumonks.org/trunk/librfid@1905 e0336214-984f-0b4b-a45f-81c69e1f0ede --- src/rfid_layer2_iso14443b.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src/rfid_layer2_iso14443b.c') diff --git a/src/rfid_layer2_iso14443b.c b/src/rfid_layer2_iso14443b.c index d88fee5..34575c5 100644 --- a/src/rfid_layer2_iso14443b.c +++ b/src/rfid_layer2_iso14443b.c @@ -173,10 +173,8 @@ transceive_attrib(struct rfid_layer2_handle *h, const unsigned char *inf, int ret = 0; DEBUGP("fsd is %u\n", h->priv.iso14443b.fsd); - if (rx_len >= rx_len-1) { - perror("rx_len too large\n"); - goto out_attrib; - } + if (rx_len >= rx_len-1) + return -EINVAL; /* initialize attrib frame */ memset(&_attrib_buf, 0, sizeof(_attrib_buf)); @@ -230,7 +228,6 @@ transceive_attrib(struct rfid_layer2_handle *h, const unsigned char *inf, memcpy(rx_data, rx_buf+1, *rx_len); out_rx: - free(rx_buf); out_attrib: return ret; -- cgit v1.2.3