[Pcsclite-cvs-commit] r6139 - /trunk/PCSC/src/spy/pcsc-spy.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Thu Dec 15 17:56:21 UTC 2011


Author: rousseau
Date: Thu Dec 15 17:56:20 2011
New Revision: 6139

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6139
Log:
spy_line(): use return instead of exit().

A library should not use exit() but return an error code instead.
Reported by Debian lintian.

Modified:
    trunk/PCSC/src/spy/pcsc-spy.c

Modified: trunk/PCSC/src/spy/pcsc-spy.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/spy/pcsc-spy.c?rev=6139&op=diff
==============================================================================
--- trunk/PCSC/src/spy/pcsc-spy.c (original)
+++ trunk/PCSC/src/spy/pcsc-spy.c Thu Dec 15 17:56:20 2011
@@ -178,8 +178,8 @@
 	size = vsnprintf(line, sizeof line, fmt, args);
 	if ((size_t)size >= sizeof line)
 	{
-		printf("Buffer is too small. Exiting!\n");
-		exit(-1);
+		printf("libpcsc-spy: Buffer is too small!\n");
+		return;
 	}
 	snprintf(threadid, sizeof threadid, "%lX@", pthread_self());
 	pthread_mutex_lock(&Log_fd_mutex);




More information about the Pcsclite-cvs-commit mailing list