From 88002bf977b797e03ce17bd973c6542418223b2f Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Tue, 17 Aug 2010 13:31:32 +0000 Subject: [PATCH] Code cleaning: driver_connect() is never executed with pndd==NULL. --- libnfc/drivers/acr122.c | 2 -- libnfc/drivers/pn53x_usb.c | 3 --- 2 files changed, 5 deletions(-) diff --git a/libnfc/drivers/acr122.c b/libnfc/drivers/acr122.c index 4b94db8..402593a 100644 --- a/libnfc/drivers/acr122.c +++ b/libnfc/drivers/acr122.c @@ -205,8 +205,6 @@ nfc_device_t* acr122_connect(const nfc_device_desc_t* pndd) SCARDCONTEXT *pscc; DBG("Attempt to connect to %s",pndd->acDevice); - // We no longer support connecting with a NULL - if(pndd == NULL) return NULL; // Test if context succeeded if (!(pscc = acr122_get_scardcontext ())) return NULL; // Test if we were able to connect to the "emulator" card diff --git a/libnfc/drivers/pn53x_usb.c b/libnfc/drivers/pn53x_usb.c index 15bcd5e..accdb4b 100644 --- a/libnfc/drivers/pn53x_usb.c +++ b/libnfc/drivers/pn53x_usb.c @@ -160,9 +160,6 @@ nfc_device_t* pn53x_usb_connect(const nfc_device_desc_t* pndd,const char * targe us.uiEndPointOut = 0; us.pudh = NULL; - // must specify device to connect to - if(pndd == NULL) return NULL; - DBG("Attempt to connect to %s device", target_name); usb_init();