From 70cb4bbd080e094f51b94eded8ef816e3739ec66 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 24 Apr 2018 11:53:54 +0200 Subject: netlink: no EINTR handling from netlink_get_setelem() This cannot happen, this call does not set the NLM_F_DUMP flag. Signed-off-by: Pablo Neira Ayuso --- src/netlink.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/netlink.c b/src/netlink.c index 525100b6..75c371dc 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -1332,7 +1332,6 @@ int netlink_get_setelem(struct netlink_ctx *ctx, const struct handle *h, struct set *set, struct expr *init) { struct nftnl_set *nls, *nls_out = NULL; - int err = 0; nls = alloc_nftnl_set(h); alloc_setelem_cache(init, nls); @@ -1340,14 +1339,8 @@ int netlink_get_setelem(struct netlink_ctx *ctx, const struct handle *h, netlink_dump_set(nls, ctx); nls_out = mnl_nft_setelem_get_one(ctx, nls); - if (!nls_out) { - nftnl_set_free(nls); - if (errno == EINTR) - return -1; - - err = -1; - goto out; - } + if (!nls_out) + return -1; ctx->set = set; set->init = set_expr_alloc(loc, set); @@ -1362,8 +1355,8 @@ int netlink_get_setelem(struct netlink_ctx *ctx, const struct handle *h, if (set->flags & NFT_SET_INTERVAL) get_set_decompose(table, set); -out: - return err; + + return 0; } void netlink_dump_obj(struct nftnl_obj *nln, struct netlink_ctx *ctx) -- cgit v1.2.3