From ffac724a876d1fb3ae08b7da727d251a6762358c Mon Sep 17 00:00:00 2001 From: Alvaro Neira Date: Tue, 30 Sep 2014 17:21:38 +0200 Subject: src: Enhance payload_gen_dependency() With this patch, this function returns a statement with the new dependency that we want to add, instead of an expression. This change is needed in a follow up patch. Signed-off-by: Alvaro Neira Ayuso Signed-off-by: Pablo Neira Ayuso --- include/payload.h | 3 ++- include/statement.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/payload.h b/include/payload.h index d47e5645..95364af1 100644 --- a/include/payload.h +++ b/include/payload.h @@ -11,8 +11,9 @@ extern void payload_init_raw(struct expr *expr, enum proto_bases base, unsigned int offset, unsigned int len); struct eval_ctx; +struct stmt; extern int payload_gen_dependency(struct eval_ctx *ctx, const struct expr *expr, - struct expr **res); + struct stmt **res); extern bool payload_is_adjacent(const struct expr *e1, const struct expr *e2); extern struct expr *payload_expr_join(const struct expr *e1, diff --git a/include/statement.h b/include/statement.h index e2f02b8c..7a57f7dd 100644 --- a/include/statement.h +++ b/include/statement.h @@ -166,6 +166,7 @@ struct stmt { extern struct stmt *stmt_alloc(const struct location *loc, const struct stmt_ops *ops); +int stmt_evaluate(struct eval_ctx *ctx, struct stmt *stmt); extern void stmt_free(struct stmt *stmt); extern void stmt_list_free(struct list_head *list); extern void stmt_print(const struct stmt *stmt); -- cgit v1.2.3