@@ -119,6 +119,12 @@ enum byteorder {
BYTEORDER_BIG_ENDIAN,
};
+static const char *const byteorder_names[] = {
+ [BYTEORDER_INVALID] = "invalid",
+ [BYTEORDER_HOST_ENDIAN] = "host endian",
+ [BYTEORDER_BIG_ENDIAN] = "big endian",
+};
+
struct expr;
/**
@@ -27,6 +27,7 @@
#include <net/if.h>
#include <errno.h>
+#include <datatype.h>
#include <expression.h>
#include <statement.h>
#include <netlink.h>
@@ -40,12 +41,6 @@
static int expr_evaluate(struct eval_ctx *ctx, struct expr **expr);
-static const char * const byteorder_names[] = {
- [BYTEORDER_INVALID] = "invalid",
- [BYTEORDER_HOST_ENDIAN] = "host endian",
- [BYTEORDER_BIG_ENDIAN] = "big endian",
-};
-
#define chain_error(ctx, s1, fmt, args...) \
__stmt_binary_error(ctx, &(s1)->location, NULL, fmt, ## args)
#define monitor_error(ctx, s1, fmt, args...) \
It's useful for debugging, so move it out of evaluate.c to make it available elsewhere. Signed-off-by: Jeremy Sowden <jeremy@azazel.net> --- include/datatype.h | 6 ++++++ src/evaluate.c | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-)