From e19e0ed6cde3176b7ef519748f893aa1afc86fa7 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Thu, 18 Apr 2013 17:53:59 +0200 Subject: cmd/netlink: make sure we always have a location in netlink operations Improve error reporting by always using a location in netlink operations. Signed-off-by: Patrick McHardy --- src/evaluate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/evaluate.c') diff --git a/src/evaluate.c b/src/evaluate.c index 6adf663d..bf169321 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -91,7 +91,7 @@ static struct expr *implicit_set_declaration(struct eval_ctx *ctx, handle_merge(&set->handle, &ctx->cmd->handle); memset(&h, 0, sizeof(h)); handle_merge(&h, &set->handle); - cmd = cmd_alloc(CMD_ADD, CMD_OBJ_SET, &h, set); + cmd = cmd_alloc(CMD_ADD, CMD_OBJ_SET, &h, &expr->location, set); cmd->location = set->location; list_add_tail(&cmd->list, &ctx->cmd->list); } @@ -122,7 +122,7 @@ static struct set *get_set(struct eval_ctx *ctx, const struct handle *h, memset(&handle, 0, sizeof(handle)); handle_merge(&handle, h); handle.set = xstrdup(identifier); - err = netlink_get_set(&nctx, &handle); + err = netlink_get_set(&nctx, &handle, &internal_location); handle_free(&handle); if (err < 0) -- cgit v1.2.3