[Pcsclite-cvs-commit] r4900 - /trunk/PCSC/src/error.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Thu Apr 29 07:20:05 UTC 2010
Author: rousseau
Date: Thu Apr 29 07:20:02 2010
New Revision: 4900
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4900
Log:
Define a minimal pcsc_stringify_error() if NO_LOG is defined.
Only the error code in hex is displayed in this case.
Gain: 2kB of .text (10%) for libpcsclite
Modified:
trunk/PCSC/src/error.c
Modified: trunk/PCSC/src/error.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/error.c?rev=4900&op=diff
==============================================================================
--- trunk/PCSC/src/error.c (original)
+++ trunk/PCSC/src/error.c Thu Apr 29 07:20:02 2010
@@ -21,10 +21,21 @@
#include <stdio.h>
#include <sys/types.h>
+#include "config.h"
#include "misc.h"
#include "pcsclite.h"
#include "strlcpycat.h"
+#ifdef NO_LOG
+PCSC_API char* pcsc_stringify_error(const long pcscError)
+{
+ static char strError[] = "0x12345678";
+
+ snprintf(strError, sizeof(strError), "0x%08lX", pcscError);
+
+ return strError;
+}
+#else
/**
* @brief This function return a human readable text for the given PC/SC error
* code.
@@ -194,4 +205,5 @@
return strError;
}
-
+#endif
+
More information about the Pcsclite-cvs-commit
mailing list