[Pcsclite-cvs-commit] r6556 - /trunk/PCSC/src/hotplug_libusb.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Wed Mar 6 14:09:42 UTC 2013
Author: rousseau
Date: Wed Mar 6 14:09:42 2013
New Revision: 6556
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=6556
Log:
cppcheck: The scope of the variable 'serialNumber' can be reduced.
Modified:
trunk/PCSC/src/hotplug_libusb.c
Modified: trunk/PCSC/src/hotplug_libusb.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/hotplug_libusb.c?rev=6556&op=diff
==============================================================================
--- trunk/PCSC/src/hotplug_libusb.c (original)
+++ trunk/PCSC/src/hotplug_libusb.c Wed Mar 6 14:09:42 2013
@@ -548,7 +548,6 @@
if (desc.iSerialNumber)
{
libusb_device_handle *device;
- unsigned char serialNumber[MAX_READERNAME];
char fullname[MAX_READERNAME];
int ret;
@@ -559,6 +558,8 @@
}
else
{
+ unsigned char serialNumber[MAX_READERNAME];
+
ret = libusb_get_string_descriptor_ascii(device, desc.iSerialNumber,
serialNumber, MAX_READERNAME);
libusb_close(device);
More information about the Pcsclite-cvs-commit
mailing list