nfc-emulate-uid: remove unreachable code and add proper cleaning when interrupted
This commit is contained in:
parent
db4fae9c2c
commit
6ab3c368b8
1 changed files with 3 additions and 3 deletions
|
@ -79,7 +79,10 @@ intr_hdlr(int sig)
|
|||
if (pnd != NULL) {
|
||||
printf("\nAborting current command...\n");
|
||||
nfc_abort_command(pnd);
|
||||
nfc_close(pnd);
|
||||
}
|
||||
nfc_exit(context);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -237,7 +240,4 @@ main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
}
|
||||
nfc_close(pnd);
|
||||
nfc_exit(context);
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue