[Pcsclite-cvs-commit] r7057 - trunk/PCSC/src

ludovic.rousseau at free.fr ludovic.rousseau at free.fr
Wed Dec 31 11:49:17 UTC 2014


Author: rousseau
Date: 2014-12-31 11:49:17 +0000 (Wed, 31 Dec 2014)
New Revision: 7057

Modified:
   trunk/PCSC/src/debuglog.c
Log:
Simplify code of DebugLogSetCategory()

Remove the use of strlcat(3)


Modified: trunk/PCSC/src/debuglog.c
===================================================================
--- trunk/PCSC/src/debuglog.c	2014-12-30 21:36:17 UTC (rev 7056)
+++ trunk/PCSC/src/debuglog.c	2014-12-31 11:49:17 UTC (rev 7057)
@@ -301,9 +301,6 @@
 
 INTERNAL int DebugLogSetCategory(const int dbginfo)
 {
-#define DEBUG_INFO_LENGTH 80
-	char text[DEBUG_INFO_LENGTH];
-
 	/* use a negative number to UNset
 	 * typically use ~DEBUG_CATEGORY_APDU
 	 */
@@ -312,14 +309,9 @@
 	else
 		LogCategory |= dbginfo;
 
-	/* set to empty string */
-	text[0] = '\0';
-
 	if (LogCategory & DEBUG_CATEGORY_APDU)
-		strlcat(text, " APDU", sizeof(text));
+		Log1(PCSC_LOG_INFO, "Debug options: APDU");
 
-	Log2(PCSC_LOG_INFO, "Debug options:%s", text);
-
 	return LogCategory;
 }
 




More information about the Pcsclite-cvs-commit mailing list