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:
parent
c9393e8c41
commit
4ca5acb35f
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user