1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 10:51:20 +03:00

ipv4acd: use structured initializer at one more place

This commit is contained in:
Yu Watanabe 2018-11-13 14:17:20 +09:00
parent c9393e8c41
commit 4ca5acb35f

View File

@ -113,14 +113,16 @@ int sd_ipv4acd_new(sd_ipv4acd **ret) {
assert_return(ret, -EINVAL);
acd = new0(sd_ipv4acd, 1);
acd = new(sd_ipv4acd, 1);
if (!acd)
return -ENOMEM;
acd->n_ref = 1;
acd->state = IPV4ACD_STATE_INIT;
acd->ifindex = -1;
acd->fd = -1;
*acd = (sd_ipv4acd) {
.n_ref = 1,
.state = IPV4ACD_STATE_INIT,
.ifindex = -1,
.fd = -1,
};
*ret = TAKE_PTR(acd);