From e404cccecd20a2418c2429cd182c18218e54bd28 Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 14 Oct 2006 12:34:38 +0000 Subject: Prepare RFID compilation in firmware mode - switch from linked lists to static arrays - remove all non-handle dynamic allocations (at the expense of stack) - declare all proto/reader/asic/layer2 structures as const - wrap all handle allocations in macros that expand to references to static structures in case of firmware mode - update copyright notices - add skeleton code for openpcd-inside-firmware driver - update TODO with remaining TODO for firmware mode git-svn-id: https://svn.gnumonks.org/trunk/librfid@1903 e0336214-984f-0b4b-a45f-81c69e1f0ede --- src/rfid_proto_mifare_classic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rfid_proto_mifare_classic.c') diff --git a/src/rfid_proto_mifare_classic.c b/src/rfid_proto_mifare_classic.c index 5d2b3ff..d45eefc 100644 --- a/src/rfid_proto_mifare_classic.c +++ b/src/rfid_proto_mifare_classic.c @@ -1,7 +1,7 @@ /* Mifare Classic implementation, PCD side. * - * (C) 2005 by Harald Welte + * (C) 2005-2006 by Harald Welte * */ @@ -110,17 +110,17 @@ static struct rfid_protocol_handle * mfcl_init(struct rfid_layer2_handle *l2h) { struct rfid_protocol_handle *ph; - ph = malloc(sizeof(struct rfid_protocol_handle)); + ph = malloc_protocol_handle(sizeof(struct rfid_protocol_handle)); return ph; } static int mfcl_fini(struct rfid_protocol_handle *ph) { - free(ph); + free_protocol_handle(ph); return 0; } -struct rfid_protocol rfid_protocol_mfcl = { +const struct rfid_protocol rfid_protocol_mfcl = { .id = RFID_PROTOCOL_MIFARE_CLASSIC, .name = "Mifare Classic", .fn = { -- cgit v1.2.3