mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
CHG: compiler warning about not using fscanf return value.
This commit is contained in:
parent
57e1e31dce
commit
6795b3da93
1 changed files with 58 additions and 52 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue