diff options
author | Thomas Haller <thaller@redhat.com> | 2022-05-27 09:45:36 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-05-27 09:52:06 +0200 |
commit | 44988e648cd5c9f912148e8b138776064797f49d (patch) | |
tree | 62684cba849bd49cf3ce2870a8d4c49df5354339 | |
parent | df6e38b409f89c0c11934c96b8e937d59984515d (diff) | |
download | libnl-44988e648cd5c9f912148e8b138776064797f49d.tar.gz |
route: format recently added code with clang-format
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | include/netlink/route/act/nat.h | 2 | ||||
-rw-r--r-- | lib/route/act/nat.c | 26 |
3 files changed, 15 insertions, 15 deletions
diff --git a/Makefile.am b/Makefile.am index 5f27dc8f..ef0f82d0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -381,9 +381,9 @@ lib_libnl_route_3_la_SOURCES = \ lib/route/act.c \ lib/route/act/gact.c \ lib/route/act/mirred.c \ + lib/route/act/nat.c \ lib/route/act/skbedit.c \ lib/route/act/vlan.c \ - lib/route/act/nat.c \ lib/route/addr.c \ lib/route/class.c \ lib/route/classid.c \ diff --git a/include/netlink/route/act/nat.h b/include/netlink/route/act/nat.h index abe5c4d5..41295ce7 100644 --- a/include/netlink/route/act/nat.h +++ b/include/netlink/route/act/nat.h @@ -32,4 +32,4 @@ extern int rtnl_nat_get_action(struct rtnl_act *act, int *action); } #endif -#endif /* NETLINK_NAT_H */ +#endif /* NETLINK_NAT_H */ diff --git a/lib/route/act/nat.c b/lib/route/act/nat.c index f300f65e..21c42476 100644 --- a/lib/route/act/nat.c +++ b/lib/route/act/nat.c @@ -65,7 +65,7 @@ nla_put_failure: } static void nat_dump_line(struct rtnl_tc *tc, void *data, - struct nl_dump_params *p) + struct nl_dump_params *p) { struct tc_nat *nat = data; char buf[32]; @@ -113,7 +113,7 @@ int rtnl_nat_set_old_addr(struct rtnl_act *act, in_addr_t addr) { struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data(TC_CAST(act)))) + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) return -NLE_NOMEM; nat->old_addr = addr; @@ -125,7 +125,7 @@ int rtnl_nat_get_old_addr(struct rtnl_act *act, in_addr_t *addr) { struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data_peek(TC_CAST(act)))) + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) return -NLE_NOATTR; *addr = nat->old_addr; @@ -144,7 +144,7 @@ int rtnl_nat_set_new_addr(struct rtnl_act *act, in_addr_t addr) { struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data(TC_CAST(act)))) + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) return -NLE_NOMEM; nat->new_addr = addr; @@ -156,7 +156,7 @@ int rtnl_nat_get_new_addr(struct rtnl_act *act, in_addr_t *addr) { struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data_peek(TC_CAST(act)))) + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) return -NLE_NOATTR; *addr = nat->new_addr; @@ -175,7 +175,7 @@ int rtnl_nat_set_mask(struct rtnl_act *act, in_addr_t bitmask) { struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data(TC_CAST(act)))) + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) return -NLE_NOMEM; nat->mask = bitmask; @@ -187,7 +187,7 @@ int rtnl_nat_get_mask(struct rtnl_act *act, in_addr_t *bitmask) { struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data_peek(TC_CAST(act)))) + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) return -NLE_NOATTR; *bitmask = nat->mask; @@ -209,7 +209,7 @@ int rtnl_nat_set_flags(struct rtnl_act *act, uint32_t flags) { struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data(TC_CAST(act)))) + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) return -NLE_NOMEM; nat->flags = flags; @@ -221,7 +221,7 @@ int rtnl_nat_get_flags(struct rtnl_act *act, uint32_t *flags) { struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data_peek(TC_CAST(act)))) + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) return -NLE_NOATTR; *flags = nat->flags; @@ -233,7 +233,7 @@ int rtnl_nat_set_action(struct rtnl_act *act, int action) { struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data(TC_CAST(act)))) + if (!(nat = (struct tc_nat *)rtnl_tc_data(TC_CAST(act)))) return -NLE_NOMEM; if (action < TC_ACT_UNSPEC) @@ -246,10 +246,10 @@ int rtnl_nat_set_action(struct rtnl_act *act, int action) int rtnl_nat_get_action(struct rtnl_act *act, int *action) { - struct tc_nat *nat; + struct tc_nat *nat; - if (!(nat = (struct tc_nat *) rtnl_tc_data_peek(TC_CAST(act)))) - return -NLE_NOATTR; + if (!(nat = (struct tc_nat *)rtnl_tc_data_peek(TC_CAST(act)))) + return -NLE_NOATTR; *action = nat->action; |