]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Revert "varlink: initialize Varlink with 0"
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 May 2019 17:39:05 +0000 (19:39 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 May 2019 17:39:27 +0000 (19:39 +0200)
This reverts commit 8688c29b5aece49805a244676cba5bba0196f509, but leaves the
reproducer. Structured assignment should be enough to fully initialize the
variable and new0 is not necessary.

src/shared/varlink.c

index 45442848bd8154d43a8c8790485030252318365f..48e18b0987085e0a48df9fcf8339f1faa35b4f21 100644 (file)
@@ -246,8 +246,7 @@ static int varlink_new(Varlink **ret) {
 
         assert(ret);
 
-        /* Here use new0 as the below structured initializer is nested. */
-        v = new0(Varlink, 1);
+        v = new(Varlink, 1);
         if (!v)
                 return -ENOMEM;