summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2023-09-20 16:26:05 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2023-09-20 18:27:30 +0200
commita72a25d432046dd38571a7fb7301350ff55f4bb4 (patch)
tree32f83afe2012283ea03f792d6879e60710ec0748
parentc4186c5376ee73efff005dbd23dd73a8e06e6ad8 (diff)
datatype: use "enum byteorder" instead of int in set_datatype_alloc()
Use the enum types as we have them. Signed-off-by: Thomas Haller <thaller@redhat.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--include/datatype.h2
-rw-r--r--src/datatype.c2
-rw-r--r--src/evaluate.c2
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;