[Pcsclite-cvs-commit] r2143 - trunk/PCSC/src
Ludovic Rousseau
rousseau at costa.debian.org
Thu Aug 31 18:59:11 UTC 2006
Author: rousseau
Date: 2006-08-31 18:59:10 +0000 (Thu, 31 Aug 2006)
New Revision: 2143
Modified:
trunk/PCSC/src/winscard_msg.c
Log:
SHMClientSetupSession(): store the returned value of socket() in an int
instead of a DWORD (unsigned) so we can check for negative values
Thanks to -Wextra for the bug report
Modified: trunk/PCSC/src/winscard_msg.c
===================================================================
--- trunk/PCSC/src/winscard_msg.c 2006-08-31 18:55:51 UTC (rev 2142)
+++ trunk/PCSC/src/winscard_msg.c 2006-08-31 18:59:10 UTC (rev 2143)
@@ -75,13 +75,16 @@
{
struct sockaddr_un svc_addr;
int one;
+ int ret;
- if ((*pdwClientID = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
+ ret = socket(AF_UNIX, SOCK_STREAM, 0);
+ if (ret < 0)
{
Log2(PCSC_LOG_CRITICAL, "Error: create on client socket: %s",
strerror(errno));
return -1;
}
+ *pdwClientID = ret;
svc_addr.sun_family = AF_UNIX;
strncpy(svc_addr.sun_path, PCSCLITE_CSOCK_NAME,
More information about the Pcsclite-cvs-commit
mailing list