Fix bug introduced in some signal traps where context was not declared

This commit is contained in:
Philippe Teuwen 2013-03-05 23:58:35 +01:00
parent 03bc30f116
commit 4822bb3e42
7 changed files with 7 additions and 7 deletions

View file

@ -71,6 +71,7 @@
#include "nfc-utils.h"
static nfc_device *pnd;
static nfc_context *context;
static bool quiet_output = false;
// Version of the emulated type4 tag:
static int type4v = 2;
@ -380,7 +381,6 @@ main(int argc, char *argv[])
}
}
nfc_context *context;
nfc_init(&context);
if (context == NULL) {
ERR("Unable to init libnfc (malloc)\n");

View file

@ -60,6 +60,7 @@
#endif
static nfc_device *pnd;
static nfc_context *context;
static void
print_usage(char *progname)
@ -198,7 +199,6 @@ main(int argc, char *argv[])
}
}
nfc_context *context;
nfc_init(&context);
if (context == NULL) {
ERR("Unable to init libnfc (malloc)\n");