diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-05-04 20:14:08 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-05-07 16:55:19 +0200 |
commit | 67a4683364e802e5b5566ca1a144228e87024739 (patch) | |
tree | b6bb45fae920e508a8111b6aa41e3ddc150c3087 /src/network/networkctl.c | |
parent | network: fix conditional jump depends on uninitialised value(s) (diff) | |
download | systemd-67a4683364e802e5b5566ca1a144228e87024739.tar.xz systemd-67a4683364e802e5b5566ca1a144228e87024739.zip |
network: use IN_ADDR_NULL and ETHER_ADDR_NULL
The change in manager_rtnl_process_address() may not be necessary,
but for safety, let's initialize the value.
Diffstat (limited to 'src/network/networkctl.c')
-rw-r--r-- | src/network/networkctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 3881aaa42b..eb3521b794 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -320,8 +320,8 @@ static int get_gateway_description( return r; for (m = reply; m; m = sd_netlink_message_next(m)) { - union in_addr_union gw = {}; - struct ether_addr mac = {}; + union in_addr_union gw = IN_ADDR_NULL; + struct ether_addr mac = ETHER_ADDR_NULL; uint16_t type; int ifi, fam; @@ -514,7 +514,7 @@ static int dump_address_labels(sd_netlink *rtnl) { for (m = reply; m; m = sd_netlink_message_next(m)) { _cleanup_free_ char *pretty = NULL; - union in_addr_union prefix = {}; + union in_addr_union prefix = IN_ADDR_NULL; uint8_t prefixlen; uint32_t label; |