aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test-milenage.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-10-26 14:00:57 (GMT)
committerJouni Malinen <j@w1.fi>2013-10-26 14:49:05 (GMT)
commite7ecab4a3b8bc5696ee6d9779bc9f9a1f8b4b6ed (patch)
tree85908522f34532000904ebcc47c331e7f0dfd942 /tests/test-milenage.c
parent39044a703348e50d9d35053baf1b9ba3f53efdbf (diff)
downloadhostap-e7ecab4a3b8bc5696ee6d9779bc9f9a1f8b4b6ed.zip
hostap-e7ecab4a3b8bc5696ee6d9779bc9f9a1f8b4b6ed.tar.gz
hostap-e7ecab4a3b8bc5696ee6d9779bc9f9a1f8b4b6ed.tar.bz2
Use ARRAY_SIZE() macro
Replace the common sizeof(a)/sizeof(a[0]) constructions with a more readable version. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'tests/test-milenage.c')
-rw-r--r--tests/test-milenage.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-milenage.c b/tests/test-milenage.c
index b41e1a7..9d2f7f0 100644
--- a/tests/test-milenage.c
+++ b/tests/test-milenage.c
@@ -249,7 +249,7 @@ static const struct gsm_milenage_test_set gsm_test_sets[] =
}
};
-#define NUM_GSM_TESTS (sizeof(gsm_test_sets) / sizeof(gsm_test_sets[0]))
+#define NUM_GSM_TESTS ARRAY_SIZE(gsm_test_sets)
struct milenage_test_set {
@@ -693,7 +693,7 @@ static const struct milenage_test_set test_sets[] =
}
};
-#define NUM_TESTS (sizeof(test_sets) / sizeof(test_sets[0]))
+#define NUM_TESTS ARRAY_SIZE(test_sets)
int main(int argc, char *argv[])