From: Lennart Poettering Date: Fri, 24 Apr 2020 21:38:47 +0000 (+0200) Subject: tree-wide: remove redundant assignments X-Git-Tag: v246-rc1~411^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0d9d333672167f7c4586c1708eee53066ce8f55d;p=thirdparty%2Fsystemd.git tree-wide: remove redundant assignments We already initialize the fields a few lines up to the very same values, hence remove this. --- diff --git a/src/basic/socket-util.c b/src/basic/socket-util.c index b502a62a248..a23dd6cbed5 100644 --- a/src/basic/socket-util.c +++ b/src/basic/socket-util.c @@ -850,8 +850,6 @@ ssize_t send_one_fd_iov_sa( cmsg->cmsg_type = SCM_RIGHTS; cmsg->cmsg_len = CMSG_LEN(sizeof(int)); memcpy(CMSG_DATA(cmsg), &fd, sizeof(int)); - - mh.msg_controllen = CMSG_SPACE(sizeof(int)); } k = sendmsg(transport_fd, &mh, MSG_NOSIGNAL | flags); if (k < 0) diff --git a/src/portable/portable.c b/src/portable/portable.c index 49087179c87..4a881460dbb 100644 --- a/src/portable/portable.c +++ b/src/portable/portable.c @@ -155,7 +155,6 @@ static int send_item( cmsg->cmsg_len = CMSG_LEN(sizeof(int)); memcpy(CMSG_DATA(cmsg), &data_fd, sizeof(int)); - mh.msg_controllen = CMSG_SPACE(sizeof(int)); iovec = IOVEC_MAKE_STRING(name); if (sendmsg(socket_fd, &mh, MSG_NOSIGNAL) < 0)