diff options
| author | Hiroki Shirokura <slank.dev@gmail.com> | 2021-03-22 00:31:56 +0000 |
|---|---|---|
| committer | Mark Stapp <mjs@voltanet.io> | 2021-06-02 10:24:48 -0400 |
| commit | 1bda3e627de060ece571012041965faa389c33c5 (patch) | |
| tree | 7783200098cc914b556746c69da1520947d06b25 /zebra/rt_netlink.c | |
| parent | 326591dcdbaf892b5f5e57d5a5d5d80d2e8937ab (diff) | |
*: use one line init instead of memset and format it
Signed-off-by: Hiroki Shirokura <slank.dev@gmail.com>
Diffstat (limited to 'zebra/rt_netlink.c')
| -rw-r--r-- | zebra/rt_netlink.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index a84c3da6ad..70db6234bb 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -419,7 +419,7 @@ static enum seg6local_action_t parse_encap_seg6local(struct rtattr *tb, struct seg6local_context *ctx) { - struct rtattr *tb_encap[256] = {0}; + struct rtattr *tb_encap[256] = {}; enum seg6local_action_t act = ZEBRA_SEG6_LOCAL_ACTION_UNSPEC; netlink_parse_rtattr_nested(tb_encap, 256, tb); @@ -443,7 +443,7 @@ parse_encap_seg6local(struct rtattr *tb, static int parse_encap_seg6(struct rtattr *tb, struct in6_addr *segs) { - struct rtattr *tb_encap[256] = {0}; + struct rtattr *tb_encap[256] = {}; struct seg6_iptunnel_encap *ipt = NULL; struct in6_addr *segments = NULL; @@ -474,8 +474,8 @@ parse_nexthop_unicast(ns_id_t ns_id, struct rtmsg *rtm, struct rtattr **tb, mpls_label_t labels[MPLS_MAX_LABELS] = {0}; int num_labels = 0; enum seg6local_action_t seg6l_act = SEG6_LOCAL_ACTION_UNSPEC; - struct seg6local_context seg6l_ctx = { {0} }; - struct in6_addr seg6_segs = { .s6_addr = {0} }; + struct seg6local_context seg6l_ctx = {}; + struct in6_addr seg6_segs = {}; int num_segs = 0; vrf_id_t nh_vrf_id = vrf_id; @@ -556,8 +556,8 @@ static uint8_t parse_multipath_nexthops_unicast(ns_id_t ns_id, mpls_label_t labels[MPLS_MAX_LABELS] = {0}; int num_labels = 0; enum seg6local_action_t seg6l_act = SEG6_LOCAL_ACTION_UNSPEC; - struct seg6local_context seg6l_ctx = { {0} }; - struct in6_addr seg6_segs = { .s6_addr = {0} }; + struct seg6local_context seg6l_ctx = {}; + struct in6_addr seg6_segs = {}; int num_segs = 0; struct rtattr *rtnh_tb[RTA_MAX + 1] = {}; |
