mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-20 15:10:38 +01:00
platform: don't use memset() to initialize variable in _new_from_nl_route()
This commit is contained in:
parent
495cfd9129
commit
9cc592ae05
1 changed files with 3 additions and 3 deletions
|
|
@ -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]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue