kernel-netlink: Simplify rt_entry_t initialization
This commit is contained in:
@@ -1832,15 +1832,11 @@ static rt_entry_t *parse_route(struct nlmsghdr *hdr, rt_entry_t *route)
|
|||||||
|
|
||||||
if (route)
|
if (route)
|
||||||
{
|
{
|
||||||
route->gtw = chunk_empty;
|
*route = (rt_entry_t){
|
||||||
route->pref_src = chunk_empty;
|
.dst_len = msg->rtm_dst_len,
|
||||||
route->dst = chunk_empty;
|
.src_len = msg->rtm_src_len,
|
||||||
route->dst_len = msg->rtm_dst_len;
|
.table = msg->rtm_table,
|
||||||
route->src = chunk_empty;
|
};
|
||||||
route->src_len = msg->rtm_src_len;
|
|
||||||
route->table = msg->rtm_table;
|
|
||||||
route->oif = 0;
|
|
||||||
route->priority = 0;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user