From: shixuantong <tongxiaoge1001@xxxxxxx> --- src/chain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/chain.c b/src/chain.c index dcfcd04..eb2cba7 100644 --- a/src/chain.c +++ b/src/chain.c @@ -150,8 +150,6 @@ bool nftnl_chain_is_set(const struct nftnl_chain *c, uint16_t attr) EXPORT_SYMBOL(nftnl_chain_unset); void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) { - int i; - if (!(c->flags & (1 << attr))) return; @@ -181,7 +179,7 @@ void nftnl_chain_unset(struct nftnl_chain *c, uint16_t attr) xfree(c->dev); break; case NFTNL_CHAIN_DEVICES: - for (i = 0; i < c->dev_array_len; i++) + for (int i = 0; i < c->dev_array_len; i++) xfree(c->dev_array[i]); xfree(c->dev_array); break; -- 2.33.0