From: Yu Watanabe Date: Tue, 13 Nov 2018 05:33:41 +0000 (+0900) Subject: sd-ndisc: use structured initializer at one more place X-Git-Tag: v240~300^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=144faa8ea505158d2d8a3fd9bbe58addefd05077;p=thirdparty%2Fsystemd.git sd-ndisc: use structured initializer at one more place --- diff --git a/src/libsystemd-network/sd-ndisc.c b/src/libsystemd-network/sd-ndisc.c index b2fd087987b..6715f72d340 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);