1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-11 05:17:44 +03:00

network: use structured initializer at one more place

This commit is contained in:
Yu Watanabe 2018-09-27 01:52:04 +09:00
parent b6de93096e
commit 9d66b48c7c

View File

@ -17,12 +17,14 @@
int routing_policy_rule_new(RoutingPolicyRule **ret) {
RoutingPolicyRule *rule;
rule = new0(RoutingPolicyRule, 1);
rule = new(RoutingPolicyRule, 1);
if (!rule)
return -ENOMEM;
rule->family = AF_INET;
rule->table = RT_TABLE_MAIN;
*rule = (RoutingPolicyRule) {
.family = AF_INET,
.table = RT_TABLE_MAIN,
};
*ret = rule;
return 0;