[Pcsclite-cvs-commit] r6511 - /trunk/PCSC/src/spy/libpcscspy.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Jan 21 10:54:42 UTC 2013


Author: rousseau
Date: Mon Jan 21 10:54:41 2013
New Revision: 6511

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6511
Log:
Explicitly ignore the result of write(2)

Even if write(2) fails the show must go on. The spy log may get
corrupted but we can't do much better.

Modified:
    trunk/PCSC/src/spy/libpcscspy.c

Modified: trunk/PCSC/src/spy/libpcscspy.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/spy/libpcscspy.c?rev=6511&op=diff
==============================================================================
--- trunk/PCSC/src/spy/libpcscspy.c (original)
+++ trunk/PCSC/src/spy/libpcscspy.c Mon Jan 21 10:54:41 2013
@@ -170,9 +170,9 @@
 
 	snprintf(threadid, sizeof threadid, "%lX@", pthread_self());
 	pthread_mutex_lock(&Log_fd_mutex);
-	write(Log_fd, threadid, strlen(threadid));
-	write(Log_fd, line, strlen(line));
-	write(Log_fd, "\n", 1);
+	(void)write(Log_fd, threadid, strlen(threadid));
+	(void)write(Log_fd, line, strlen(line));
+	(void)write(Log_fd, "\n", 1);
 	pthread_mutex_unlock(&Log_fd_mutex);
 }
 
@@ -197,9 +197,9 @@
 	}
 	snprintf(threadid, sizeof threadid, "%lX@", pthread_self());
 	pthread_mutex_lock(&Log_fd_mutex);
-	write(Log_fd, threadid, strlen(threadid));
-	write(Log_fd, line, size);
-	write(Log_fd, "\n", 1);
+	(void)write(Log_fd, threadid, strlen(threadid));
+	(void)write(Log_fd, line, size);
+	(void)write(Log_fd, "\n", 1);
 	pthread_mutex_unlock(&Log_fd_mutex);
 }
 




More information about the Pcsclite-cvs-commit mailing list