]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-radv: use structured initializer at one more place
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 13 Nov 2018 05:28:16 +0000 (14:28 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 16 Nov 2018 13:57:42 +0000 (22:57 +0900)
src/libsystemd-network/sd-radv.c

index 89c5a334972efb478f05d8940cb439d5e3db03e9..2f4a5c03fa40949bb59a7aa46a78065f7c99e303 100644 (file)
@@ -27,14 +27,14 @@ _public_ int sd_radv_new(sd_radv **ret) {
 
         assert_return(ret, -EINVAL);
 
-        ra = new0(sd_radv, 1);
+        ra = new(sd_radv, 1);
         if (!ra)
                 return -ENOMEM;
 
-        ra->n_ref = 1;
-        ra->fd = -1;
-
-        LIST_HEAD_INIT(ra->prefixes);
+        *ra = (sd_radv) {
+                .n_ref = 1,
+                .fd = -1,
+        };
 
         *ret = TAKE_PTR(ra);