diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2013-11-18 14:54:58 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-11-18 15:34:00 -0500 |
| commit | 029b234fb34d53e11cadd8c1f530107f557e1aca (patch) | |
| tree | 27bd2ee5ec4653385c91f271529049563f94879e /net | |
| parent | bceaa90240b6019ed73b49965eac7d167610be69 (diff) | |
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: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
| -rw-r--r-- | net/netlink/genetlink.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index f07eb568a1db..f54215d7b8f3 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
| @@ -647,21 +647,21 @@ static int ctrl_fill_info(struct genl_family *family, u32 portid, u32 seq, | |||
| 647 | for (i = 0; i < family->n_ops; i++) { | 647 | for (i = 0; i < family->n_ops; i++) { |
| 648 | struct nlattr *nest; | 648 | struct nlattr *nest; |
| 649 | const struct genl_ops *ops = &family->ops[i]; | 649 | const struct genl_ops *ops = &family->ops[i]; |
| 650 | u32 flags = ops->flags; | 650 | u32 op_flags = ops->flags; |
| 651 | 651 | ||
| 652 | if (ops->dumpit) | 652 | if (ops->dumpit) |
| 653 | flags |= GENL_CMD_CAP_DUMP; | 653 | op_flags |= GENL_CMD_CAP_DUMP; |
| 654 | if (ops->doit) | 654 | if (ops->doit) |
| 655 | flags |= GENL_CMD_CAP_DO; | 655 | op_flags |= GENL_CMD_CAP_DO; |
| 656 | if (ops->policy) | 656 | if (ops->policy) |
| 657 | flags |= GENL_CMD_CAP_HASPOL; | 657 | op_flags |= GENL_CMD_CAP_HASPOL; |
| 658 | 658 | ||
| 659 | nest = nla_nest_start(skb, i + 1); | 659 | nest = nla_nest_start(skb, i + 1); |
| 660 | if (nest == NULL) | 660 | if (nest == NULL) |
| 661 | goto nla_put_failure; | 661 | goto nla_put_failure; |
| 662 | 662 | ||
| 663 | if (nla_put_u32(skb, CTRL_ATTR_OP_ID, ops->cmd) || | 663 | if (nla_put_u32(skb, CTRL_ATTR_OP_ID, ops->cmd) || |
| 664 | nla_put_u32(skb, CTRL_ATTR_OP_FLAGS, flags)) | 664 | nla_put_u32(skb, CTRL_ATTR_OP_FLAGS, op_flags)) |
| 665 | goto nla_put_failure; | 665 | goto nla_put_failure; |
| 666 | 666 | ||
| 667 | nla_nest_end(skb, nest); | 667 | nla_nest_end(skb, nest); |
