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:
parent
b6de93096e
commit
9d66b48c7c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user