unit: Update to the new mpdu_validate API

mpdu_validate will directly return a const pointer if the validation
succeeds.
This commit is contained in:
Tomasz Bursztyka 2015-01-22 17:58:22 +02:00 committed by Denis Kenzior
parent e02f02fa69
commit 8fba847b9d
1 changed files with 3 additions and 6 deletions

View File

@ -63,13 +63,10 @@ static struct deauthentication_data deauthentication_test_1 = {
static void deauthentication_test(const void *data)
{
const struct deauthentication_data *test = data;
struct mpdu *mpdu;
bool ret;
const struct mpdu *mpdu;
ret = mpdu_validate(test->frame, test->frame_len);
assert(ret);
mpdu = (struct mpdu *)test->frame;
mpdu = mpdu_validate(test->frame, test->frame_len);
assert(mpdu);
assert(mpdu->fc.type == MPDU_TYPE_MANAGEMENT);
assert(mpdu->fc.subtype == MPDU_MANAGEMENT_SUBTYPE_DEAUTHENTICATION);