Fix cppcheck warning: The scope of the variable X can be reduced.

This commit is contained in:
Philippe Teuwen 2013-04-05 14:38:03 +02:00
parent fc144fe389
commit 9cb9e0e6da
5 changed files with 5 additions and 7 deletions

View file

@ -154,7 +154,6 @@ acr122_pcsc_scan(const nfc_context *context, nfc_connstring connstrings[], const
char acDeviceNames[256 + 64 * PCSC_MAX_DEVICES];
size_t szDeviceNamesLen = sizeof(acDeviceNames);
SCARDCONTEXT *pscc;
bool bSupported;
int i;
// Clear the reader list
@ -172,7 +171,7 @@ acr122_pcsc_scan(const nfc_context *context, nfc_connstring connstrings[], const
size_t device_found = 0;
while ((acDeviceNames[szPos] != '\0') && (device_found < connstrings_len)) {
bSupported = false;
bool bSupported = false;
for (i = 0; supported_devices[i] && !bSupported; i++) {
int l = strlen(supported_devices[i]);
bSupported = 0 == strncmp(supported_devices[i], acDeviceNames + szPos, l);