On 5/23/07, Mounir IDRASSI mounir.idrassi@idrix.fr wrote:
Hi, This patch adds helper variables and functions that exposes pcsc-lite functionalities for the use of the upcoming implementation.
+ /* loading entry points*/ + bSuccess = TRUE; + if (bSuccess && + !(liteSCardEstablishContext = (SCardEstablishContextPtr) wine_dlsym(g_pcscliteHandle,"SCardEstablishContext",szErr,sizeof(szErr)))) + { + bSuccess = FALSE; + ERR("Failed to get SCardEstablishContext from pcsclite library. Error = %s\n",szErr); + }
This would be a lot cleaner as:
if (!(liteSCardEstablishContext = (SCardEstablishContextPtr) wine_dlsym(g_pcscliteHandle,"SCardEstablishContext",szErr,sizeof(szErr))) { ERR("Failed to get SCardEstablishContext from pcsclite library. Error = %s\n",szErr); goto error; }
....
return TRUE;
error: wine_dlclose(g_pcscliteHandle,NULL,0); g_pcscliteHandle = NULL; return FALSE; }