]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
libsystemd-network: remove double initialization
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 14 May 2024 16:04:31 +0000 (18:04 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 14 May 2024 16:55:34 +0000 (18:55 +0200)
src/libsystemd-network/icmp6-util.c

index a28f175b5e5afb5f1f477dbefe3a9310d630c54b..75a6489967265293c004e3c76c7f089d3713f8c0 100644 (file)
@@ -121,7 +121,7 @@ int icmp6_receive(
         /* This needs to be initialized with zero. See #20741. */
         CMSG_BUFFER_TYPE(CMSG_SPACE(sizeof(int)) + /* ttl */
                          CMSG_SPACE_TIMEVAL) control = {};
-        struct iovec iov = {};
+        struct iovec iov = { buffer, size };
         union sockaddr_union sa = {};
         struct msghdr msg = {
                 .msg_name = &sa.sa,
@@ -133,8 +133,6 @@ int icmp6_receive(
         };
         ssize_t len;
 
-        iov = IOVEC_MAKE(buffer, size);
-
         len = recvmsg_safe(fd, &msg, MSG_DONTWAIT);
         if (len < 0)
                 return (int) len;