*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdlib.h>
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));
memcpy(rx_data, rx_buf+1, *rx_len);
out_rx:
- free(rx_buf);
out_attrib:
return ret;
static int
iso14443b_getopt(struct rfid_layer2_handle *handle,
- int optname, void *optval, unsigned int optlen)
+ int optname, void *optval, unsigned int *optlen)
{
unsigned int *opt_ui = optval;