diff options
author | Jakub Kicinski <kuba@kernel.org> | 2023-06-09 00:11:54 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-06-10 00:40:31 +0300 |
commit | 7234415b8f86c496fec2d62a48f136cde530ad95 (patch) | |
tree | efcb20f5b5d815212f817ba1ff5da701b8d8e393 /tools/net/ynl/generated/netdev-user.c | |
parent | e4ea3cc68472b1cc0b68a1adf145ee39fb90a506 (diff) | |
download | linux-7234415b8f86c496fec2d62a48f136cde530ad95.tar.xz |
tools: ynl: regen: regenerate the if ladders
Renegate the code to combine } and else and use tmp variable
to store type.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/net/ynl/generated/netdev-user.c')
-rw-r--r-- | tools/net/ynl/generated/netdev-user.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/net/ynl/generated/netdev-user.c b/tools/net/ynl/generated/netdev-user.c index fe0da71f653c..12069784637e 100644 --- a/tools/net/ynl/generated/netdev-user.c +++ b/tools/net/ynl/generated/netdev-user.c @@ -79,13 +79,14 @@ int netdev_dev_get_rsp_parse(const struct nlmsghdr *nlh, void *data) dst = yarg->data; mnl_attr_for_each(attr, nlh, sizeof(struct genlmsghdr)) { - if (mnl_attr_get_type(attr) == NETDEV_A_DEV_IFINDEX) { + unsigned int type = mnl_attr_get_type(attr); + + if (type == NETDEV_A_DEV_IFINDEX) { if (ynl_attr_validate(yarg, attr)) return MNL_CB_ERROR; dst->_present.ifindex = 1; dst->ifindex = mnl_attr_get_u32(attr); - } - else if (mnl_attr_get_type(attr) == NETDEV_A_DEV_XDP_FEATURES) { + } else if (type == NETDEV_A_DEV_XDP_FEATURES) { if (ynl_attr_validate(yarg, attr)) return MNL_CB_ERROR; dst->_present.xdp_features = 1; |