From e7b43ec0c9bc244795163478aa4c3e33750b5d64 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Thu, 6 Mar 2014 16:29:52 +0100 Subject: expr: make expr_binary_error() usable outside of evaluation Turn the eval_ctx argument into a list_head to queue the error to. Signed-off-by: Patrick McHardy --- src/payload.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/payload.c') diff --git a/src/payload.c b/src/payload.c index a312e079..9f2db6d9 100644 --- a/src/payload.c +++ b/src/payload.c @@ -154,12 +154,12 @@ int payload_gen_dependency(struct eval_ctx *ctx, const struct expr *expr, if (expr->payload.base < h->base) { if (expr->payload.base < h->base - 1) - return expr_error(ctx, expr, + return expr_error(ctx->msgs, expr, "payload base is invalid for this " "family"); if (proto_dev_type(expr->payload.desc, &type) < 0) - return expr_error(ctx, expr, + return expr_error(ctx->msgs, expr, "protocol specification is invalid " "for this family"); @@ -181,14 +181,14 @@ int payload_gen_dependency(struct eval_ctx *ctx, const struct expr *expr, desc = &proto_inet_service; if (desc == NULL) - return expr_error(ctx, expr, + return expr_error(ctx->msgs, expr, "ambiguous payload specification: " "no %s protocol specified", proto_base_names[expr->payload.base - 1]); protocol = proto_find_num(desc, expr->payload.desc); if (protocol < 0) - return expr_error(ctx, expr, + return expr_error(ctx->msgs, expr, "conflicting protocols specified: %s vs. %s", desc->name, expr->payload.desc->name); -- cgit v1.2.3