From 9d66b48c7c517ef56c648ebe5d068ecc89c584e6 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Thu, 27 Sep 2018 01:52:04 +0900 Subject: [PATCH] network: use structured initializer at one more place --- src/network/networkd-routing-policy-rule.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c index 588e618..afa1449 100644 --- a/src/network/networkd-routing-policy-rule.c +++ b/src/network/networkd-routing-policy-rule.c @@ -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; -- 2.7.4