From: Yu Watanabe Date: Wed, 26 Sep 2018 16:52:04 +0000 (+0900) Subject: network: use structured initializer at one more place X-Git-Tag: v240~671^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9d66b48c7c517ef56c648ebe5d068ecc89c584e6;p=thirdparty%2Fsystemd.git network: use structured initializer at one more place --- diff --git a/src/network/networkd-routing-policy-rule.c b/src/network/networkd-routing-policy-rule.c index 588e618351c..afa14491913 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;