[Pcsclite-cvs-commit] Drivers/ccid/src ifdhandler.c,1.39,1.40

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory haydn:/tmp/cvs-serv791/src

Modified Files:
	ifdhandler.c 
Log Message:
init_driver(): use base 0 instead of 16 in strtoul() so that you can
express the decimal value 15 as: 15 (decimal), 0xF (hex) or 017 (octal)


Index: ifdhandler.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/ifdhandler.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- ifdhandler.c	16 Jul 2004 06:53:25 -0000	1.39
+++ ifdhandler.c	16 Jul 2004 07:06:14 -0000	1.40
@@ -907,7 +907,7 @@
 	if (0 == LTPBundleFindValueWithKey(infofile, "ifdLogLevel", keyValue, 0))
 	{
 		/* convert from hex or dec or octal */
-		LogLevel = strtoul(keyValue, 0, 16);
+		LogLevel = strtoul(keyValue, NULL, 0);
 
 		/* print the log level used */
 		debug_msg("%s:%d:%s LogLevel: 0x%.4X", __FILE__, __LINE__, __FUNCTION__,
@@ -918,7 +918,7 @@
 	if (0 == LTPBundleFindValueWithKey(infofile, "ifdDriverOptions", keyValue, 0))
 	{
 		/* convert from hex or dec or octal */
-		DriverOptions = strtoul(keyValue, 0, 16);
+		DriverOptions = strtoul(keyValue, NULL, 0);
 
 		/* print the log level used */
 		debug_msg("%s:%d:%s DriverOptions: 0x%.4X", __FILE__, __LINE__,