mirror of
https://github.com/nfc-tools/libnfc.git
synced 2026-03-11 10:03:49 +00:00
nfc-emulate-uid: remove unreachable code and add proper cleaning when interrupted
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user