From a72a25d432046dd38571a7fb7301350ff55f4bb4 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 20 Sep 2023 16:26:05 +0200 Subject: datatype: use "enum byteorder" instead of int in set_datatype_alloc() Use the enum types as we have them. Signed-off-by: Thomas Haller Signed-off-by: Pablo Neira Ayuso --- include/datatype.h | 2 +- src/datatype.c | 2 +- src/evaluate.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/datatype.h b/include/datatype.h index 52a2e943..4e838a38 100644 --- a/include/datatype.h +++ b/include/datatype.h @@ -301,7 +301,7 @@ concat_subtype_lookup(uint32_t type, unsigned int n) } extern const struct datatype * -set_datatype_alloc(const struct datatype *orig_dtype, unsigned int byteorder); +set_datatype_alloc(const struct datatype *orig_dtype, enum byteorder byteorder); extern void time_print(uint64_t msec, struct output_ctx *octx); extern struct error_record *time_parse(const struct location *loc, diff --git a/src/datatype.c b/src/datatype.c index 14d5a0e6..8d65ab8b 100644 --- a/src/datatype.c +++ b/src/datatype.c @@ -1310,7 +1310,7 @@ const struct datatype *concat_type_alloc(uint32_t type) } const struct datatype *set_datatype_alloc(const struct datatype *orig_dtype, - unsigned int byteorder) + enum byteorder byteorder) { struct datatype *dtype; diff --git a/src/evaluate.c b/src/evaluate.c index 03586922..c404e9a8 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -1340,8 +1340,8 @@ static int expr_evaluate_bitwise(struct eval_ctx *ctx, struct expr **expr) { struct expr *op = *expr, *left = op->left; const struct datatype *dtype; + enum byteorder byteorder; unsigned int max_len; - int byteorder; if (ctx->stmt_len > left->len) { max_len = ctx->stmt_len; -- cgit v1.2.3