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

@ -60,7 +60,6 @@ main(int argc, const char *argv[])
nfc_device *pnd = NULL;
const char *acLibnfcVersion;
bool result;
int res = 0;
uint8_t abtRx[PN53x_EXTENDED_FRAME__DATA_MAX_LEN];
size_t szRx = sizeof(abtRx);
@ -92,6 +91,7 @@ main(int argc, const char *argv[])
}
for (i = 0; i < szFound; i++) {
int res = 0;
pnd = nfc_open(context, connstrings[i]);
if (pnd == NULL) {

View file

@ -120,10 +120,10 @@ int main(int argc, const char *argv[])
exit(EXIT_FAILURE);
}
char *cmd;
const char *prompt = "> ";
while (1) {
int offset = 0;
char *cmd;
#if defined(HAVE_READLINE)
if (input == NULL) { // means we use stdin
cmd = readline(prompt);