diff options
| author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-13 14:33:41 +0900 |
|---|---|---|
| committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-11-16 22:57:42 +0900 |
| commit | 144faa8ea505158d2d8a3fd9bbe58addefd05077 (patch) | |
| tree | 3d84e1a6f308655aff67528d6e857977d97be2fb /src/libsystemd-network/sd-ndisc.c | |
| parent | 807a8edeb16ca34a607e25bbc1556be14131a4e0 (diff) | |
| download | systemd-144faa8ea505158d2d8a3fd9bbe58addefd05077.tar.gz | |
sd-ndisc: use structured initializer at one more place
Diffstat (limited to 'src/libsystemd-network/sd-ndisc.c')
| -rw-r--r-- | src/libsystemd-network/sd-ndisc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c index b2fd087987..6715f72d34 100644 --- a/src/libsystemd-network/sd-ndisc.c +++ b/src/libsystemd-network/sd-ndisc.c @@ -136,12 +136,14 @@ _public_ int sd_ndisc_new(sd_ndisc **ret) { assert_return(ret, -EINVAL); - nd = new0(sd_ndisc, 1); + nd = new(sd_ndisc, 1); if (!nd) return -ENOMEM; - nd->n_ref = 1; - nd->fd = -1; + *nd = (sd_ndisc) { + .n_ref = 1, + .fd = -1, + }; *ret = TAKE_PTR(nd); |
