re: winscard: add pcsc-lite helpers for upcoming implementation
James wrote:
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; }
I think in C you can skip the cast from void *, can't you? e.g. liteSCardEstablishContext = wine_dlsym(g_pcscliteHandle,"SCardEstablishContext",szErr,sizeof(szErr)); if (!liteSCardEstablishContext) { ERR("Failed to get SCardEstablishContext from pcsclite library. Error = %s\n",szErr); goto error; } -- Wine for Windows ISVs: http://kegel.com/wine/isv
The code is definitely cleaner with all your suggestions. I'm applying them now. Mounir IDRASSI IDRIX - Cryptography and IT Security Experts http://www.idrix.fr
James wrote:
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; }
I think in C you can skip the cast from void *, can't you? e.g.
liteSCardEstablishContext = wine_dlsym(g_pcscliteHandle,"SCardEstablishContext",szErr,sizeof(szErr));
participants (2)
-
Dan Kegel -
Mounir IDRASSI