diff --git a/libfreefare/freefare_internal.h b/libfreefare/freefare_internal.h index b67a1ef..e38b3a8 100644 --- a/libfreefare/freefare_internal.h +++ b/libfreefare/freefare_internal.h @@ -261,7 +261,6 @@ struct mifare_ultralight_tag { /* mifare_ultralight_read() reads 4 pages at a time (wrapping) */ MifareUltralightPage cache[MIFARE_ULTRALIGHT_MAX_PAGE_COUNT + 3]; uint8_t cached_pages[MIFARE_ULTRALIGHT_MAX_PAGE_COUNT]; - bool is_ultralightc; }; /* diff --git a/libfreefare/mifare_ultralight.c b/libfreefare/mifare_ultralight.c index b0bd95a..2afb212 100644 --- a/libfreefare/mifare_ultralight.c +++ b/libfreefare/mifare_ultralight.c @@ -121,7 +121,6 @@ _mifare_ultralightc_tag_new (nfc_device *device, nfc_target target, bool is_ultr FreefareTag tag; if ((tag = malloc (sizeof (struct mifare_ultralight_tag)))) { - MIFARE_ULTRALIGHT(tag)->is_ultralightc = is_ultralightc; tag->type = (is_ultralightc) ? MIFARE_ULTRALIGHT_C : MIFARE_ULTRALIGHT; tag->free_tag = mifare_ultralightc_tag_free; tag->device = device; @@ -351,13 +350,13 @@ mifare_ultralightc_authenticate (FreefareTag tag, const MifareDESFireKey key) bool is_mifare_ultralight (FreefareTag tag) { - return !MIFARE_ULTRALIGHT(tag)->is_ultralightc; + return tag->type == MIFARE_ULTRALIGHT; } bool is_mifare_ultralightc (FreefareTag tag) { - return MIFARE_ULTRALIGHT(tag)->is_ultralightc; + return tag->type == MIFARE_ULTRALIGHT_C; } /*