[Pcsclite-cvs-commit] r2861 - /trunk/Drivers/ccid/src/parse.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Sat Mar 29 15:31:58 UTC 2008


Author: rousseau
Date: Sat Mar 29 15:31:58 2008
New Revision: 2861

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=2861
Log:
use an unsigned char [] buffer only for multi-bytes conversions.
usb_* functions want a char [] buffer.

Modified:
    trunk/Drivers/ccid/src/parse.c

Modified: trunk/Drivers/ccid/src/parse.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/parse.c?rev=2861&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/parse.c (original)
+++ trunk/Drivers/ccid/src/parse.c Sat Mar 29 15:31:58 2008
@@ -151,7 +151,9 @@
 {
 	struct usb_interface_descriptor *usb_interface;
 	unsigned char *extra;
-	unsigned char buffer[256*sizeof(int)];  /* maximum is 256 records */
+	char buffer[256*sizeof(int)];  /* maximum is 256 records */
+	/* unsigned version of buffer[] used for multi-bytes conversions */
+	unsigned char *ubuffer = (unsigned char *)buffer;
 
 	/*
 	 * Vendor/model name
@@ -338,7 +340,7 @@
 				}
 
 				for (i=0; i<n; i+=4)
-					printf("   Support %d kHz\n", dw2i(buffer, i));
+					printf("   Support %d kHz\n", dw2i(ubuffer, i));
 			}
 	}
 	printf("  dwDataRate: %d bps\n", dw2i(extra, 19));
@@ -381,7 +383,7 @@
 				}
 
 				for (i=0; i<n; i+=4)
-					printf("   Support %d bps\n", dw2i(buffer, i));
+					printf("   Support %d bps\n", dw2i(ubuffer, i));
 			}
 	}
 	printf("  dwMaxIFSD: %d\n", dw2i(extra, 28));




More information about the Pcsclite-cvs-commit mailing list