CHG: compiler warning about not using fscanf return value.

This commit is contained in:
iceman1001 2017-03-06 19:24:50 +01:00
commit 6795b3da93

View file

@ -158,11 +158,18 @@ usb_dev_handle* findProxmark(int verbose, unsigned int *iface)
if (iUnit > 1) {
while (iSelection < 1 || iSelection > iUnit) {
fprintf(stdout, "Which unit do you want to connect to? ");
fscanf(stdin, "%d", &iSelection);
int res = fscanf(stdin, "%d", &iSelection);
if ( res != 1 ) {
fprintf(stderr, "Input parse error");
fflush(stderr);
abort();
}
}
else
}
else {
iSelection = 1;
}
iSelection --;
for (int i = 0; i < iUnit; i++) {
@ -173,7 +180,6 @@ usb_dev_handle* findProxmark(int verbose, unsigned int *iface)
return units[iSelection].handle;
}
return NULL;
}