aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-11-08 21:31:48 +0100
committerHarald Welte <laforge@gnumonks.org>2015-11-08 21:31:48 +0100
commitf64f68871ef4bc81236bdbc326098cb3f323f99a (patch)
tree66f2b4824117091a1ddef74a1e82e064b3289d30
parent30a53f823a8c0a1764fc168a8ceeae256c93f626 (diff)
move ARRAY_SIZE() definition to utils.hlaforge/cosmetic
-rw-r--r--firmware/src_simtrace/iso7816_fidi.c3
-rw-r--r--firmware/src_simtrace/utils.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/firmware/src_simtrace/iso7816_fidi.c b/firmware/src_simtrace/iso7816_fidi.c
index 052654c..b35f068 100644
--- a/firmware/src_simtrace/iso7816_fidi.c
+++ b/firmware/src_simtrace/iso7816_fidi.c
@@ -20,10 +20,9 @@
#include <stdint.h>
#include <errno.h>
+#include "utils.h"
#include "iso7816_fidi.h"
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
/* Table 7 of ISO 7816-3:2006 */
static const uint16_t fi_table[] = {
372, 372, 558, 744, 1116, 1488, 1860, 0,
diff --git a/firmware/src_simtrace/utils.h b/firmware/src_simtrace/utils.h
new file mode 100644
index 0000000..2eff30d
--- /dev/null
+++ b/firmware/src_simtrace/utils.h
@@ -0,0 +1,4 @@
+#pragma once
+
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+