summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/ectool.c4
-rw-r--r--util/lbplay.c5
2 files changed, 2 insertions, 7 deletions
diff --git a/util/ectool.c b/util/ectool.c
index b1115aefcd..0315b6dbb1 100644
--- a/util/ectool.c
+++ b/util/ectool.c
@@ -14,13 +14,11 @@
#include "battery.h"
#include "comm-host.h"
+#include "compile_time_macros.h"
#include "ectool.h"
#include "lightbar.h"
#include "lock/gec_lock.h"
-/* Handy tricks */
-#define BUILD_ASSERT(cond) ((void)sizeof(char[1 - 2*!(cond)]))
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
/* Don't use a macro where an inline will do... */
static inline int MIN(int a, int b) { return a < b ? a : b; }
diff --git a/util/lbplay.c b/util/lbplay.c
index bcf90148e7..9cb853aa75 100644
--- a/util/lbplay.c
+++ b/util/lbplay.c
@@ -11,13 +11,10 @@
#include <unistd.h>
#include "comm-host.h"
+#include "compile_time_macros.h"
#include "lightbar.h"
#include "lock/gec_lock.h"
-/* Handy tricks */
-#define BUILD_ASSERT(cond) ((void)sizeof(char[1 - 2*!(cond)]))
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
#define LB_SIZES(SUBCMD) { \
sizeof(((struct ec_params_lightbar *)0)->SUBCMD) \
+ sizeof(((struct ec_params_lightbar *)0)->cmd), \