From 33ab01f669faaae45e8022f025976df18d405236 Mon Sep 17 00:00:00 2001 From: Tomasz Bursztyka Date: Thu, 22 Jan 2015 17:58:24 +0200 Subject: [PATCH] unit: Update to the new eapol_key_validate API eapol_key_validate will directly return a const pointer if the validation succeeds. --- unit/test-eapol.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/unit/test-eapol.c b/unit/test-eapol.c index bc0a788b..1a376370 100644 --- a/unit/test-eapol.c +++ b/unit/test-eapol.c @@ -245,11 +245,10 @@ static struct eapol_key_data eapol_key_test_4 = { static void eapol_key_test(const void *data) { const struct eapol_key_data *test = data; - struct eapol_key *packet; + const struct eapol_key *packet; - assert(eapol_verify(test->frame, test->frame_len)); - - packet = (struct eapol_key *)test->frame; + packet = eapol_key_validate(test->frame, test->frame_len); + assert(packet); assert(packet->protocol_version == test->protocol_version); assert(packet->packet_type == 0x03);