platform: don't use memset() to initialize variable in _new_from_nl_route()

This commit is contained in:
Thomas Haller 2019-02-17 11:12:38 +01:00
parent 495cfd9129
commit 9cc592ae05

View file

@ -3107,7 +3107,9 @@ _new_from_nl_route (struct nlmsghdr *nlh, gboolean id_only)
gboolean is_present;
int ifindex;
NMIPAddr gateway;
} nh;
} nh = {
.is_present = FALSE,
};
guint32 mss;
guint32 window = 0;
guint32 cwnd = 0;
@ -3151,8 +3153,6 @@ _new_from_nl_route (struct nlmsghdr *nlh, gboolean id_only)
* parse nexthops. Only handle routes with one nh.
*****************************************************************/
memset (&nh, 0, sizeof (nh));
if (tb[RTA_MULTIPATH]) {
struct rtnexthop *rtnh = nla_data (tb[RTA_MULTIPATH]);
size_t tlen = nla_len (tb[RTA_MULTIPATH]);