network: use IN_ADDR_NULL

This commit is contained in:
Yu Watanabe 2018-11-12 00:48:30 +09:00
parent c1b4a2b03a
commit 3c7911e810
1 changed files with 3 additions and 3 deletions

View File

@ -364,10 +364,10 @@ void route_update(Route *route,
assert(route);
assert(src || src_prefixlen == 0);
route->src = src ? *src : (union in_addr_union) {};
route->src = src ? *src : IN_ADDR_NULL;
route->src_prefixlen = src_prefixlen;
route->gw = gw ? *gw : (union in_addr_union) {};
route->prefsrc = prefsrc ? *prefsrc : (union in_addr_union) {};
route->gw = gw ? *gw : IN_ADDR_NULL;
route->prefsrc = prefsrc ? *prefsrc : IN_ADDR_NULL;
route->scope = scope;
route->protocol = protocol;
route->type = type;