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 /lib/zclient.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 'lib/zclient.c')
| -rw-r--r-- | lib/zclient.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/zclient.c b/lib/zclient.c index f6b97a768f..158a20eb58 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -441,16 +441,14 @@ enum zclient_send_status zclient_send_localsid(struct zclient *zclient, enum seg6local_action_t action, const struct seg6local_context *context) { - struct prefix_ipv6 p; - struct zapi_route api; - struct nexthop nh; + struct prefix_ipv6 p = {}; + struct zapi_route api = {}; + struct nexthop nh = {}; - memset(&p, 0, sizeof(p)); p.family = AF_INET6; p.prefixlen = 128; p.prefix = *sid; - memset(&api, 0, sizeof(api)); api.vrf_id = VRF_DEFAULT; api.type = ZEBRA_ROUTE_BGP; api.instance = 0; @@ -464,7 +462,6 @@ enum zclient_send_status zclient_send_localsid(struct zclient *zclient, SET_FLAG(api.flags, ZEBRA_FLAG_SEG6LOCAL_ROUTE); SET_FLAG(api.message, ZAPI_MESSAGE_NEXTHOP); - memset(&nh, 0, sizeof(nh)); nh.type = NEXTHOP_TYPE_IFINDEX; nh.ifindex = oif; nexthop_add_seg6local(&nh, action, context); |
