Commit 029b234f authored by Johannes Berg's avatar Johannes Berg Committed by David S. Miller

genetlink: rename shadowed variable

Sparse pointed out that the new flags variable I had added
shadowed an existing one, rename the new one to avoid that,
making the code clearer.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bceaa902
...@@ -647,21 +647,21 @@ static int ctrl_fill_info(struct genl_family *family, u32 portid, u32 seq, ...@@ -647,21 +647,21 @@ static int ctrl_fill_info(struct genl_family *family, u32 portid, u32 seq,
for (i = 0; i < family->n_ops; i++) { for (i = 0; i < family->n_ops; i++) {
struct nlattr *nest; struct nlattr *nest;
const struct genl_ops *ops = &family->ops[i]; const struct genl_ops *ops = &family->ops[i];
u32 flags = ops->flags; u32 op_flags = ops->flags;
if (ops->dumpit) if (ops->dumpit)
flags |= GENL_CMD_CAP_DUMP; op_flags |= GENL_CMD_CAP_DUMP;
if (ops->doit) if (ops->doit)
flags |= GENL_CMD_CAP_DO; op_flags |= GENL_CMD_CAP_DO;
if (ops->policy) if (ops->policy)
flags |= GENL_CMD_CAP_HASPOL; op_flags |= GENL_CMD_CAP_HASPOL;
nest = nla_nest_start(skb, i + 1); nest = nla_nest_start(skb, i + 1);
if (nest == NULL) if (nest == NULL)
goto nla_put_failure; goto nla_put_failure;
if (nla_put_u32(skb, CTRL_ATTR_OP_ID, ops->cmd) || if (nla_put_u32(skb, CTRL_ATTR_OP_ID, ops->cmd) ||
nla_put_u32(skb, CTRL_ATTR_OP_FLAGS, flags)) nla_put_u32(skb, CTRL_ATTR_OP_FLAGS, op_flags))
goto nla_put_failure; goto nla_put_failure;
nla_nest_end(skb, nest); nla_nest_end(skb, nest);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment