Date: Mon, 16 Jan 2017 07:08:06 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r312267 - stable/11/contrib/bsnmp/snmpd Message-ID: <201701160708.v0G786Io004548@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Mon Jan 16 07:08:06 2017 New Revision: 312267 URL: https://svnweb.freebsd.org/changeset/base/312267 Log: MFC r310656,r311221: r310656: style(9): sort alignment in udp_recv(..) r311221: Initialize msg.msg_flags to 0 This mutes a valid coverity warning about it being uninitialized when passed in to sendmsg(2). CID: 1368202 Modified: stable/11/contrib/bsnmp/snmpd/trans_udp.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/bsnmp/snmpd/trans_udp.c ============================================================================== --- stable/11/contrib/bsnmp/snmpd/trans_udp.c Mon Jan 16 07:07:45 2017 (r312266) +++ stable/11/contrib/bsnmp/snmpd/trans_udp.c Mon Jan 16 07:08:06 2017 (r312267) @@ -226,6 +226,7 @@ udp_send(struct tport *tp, const u_char iov.iov_base = __DECONST(void*, buf); iov.iov_len = len; + msg.msg_flags = 0; msg.msg_iov = &iov; msg.msg_iovlen = 1; msg.msg_name = __DECONST(void *, addr); @@ -334,10 +335,10 @@ static ssize_t udp_recv(struct tport *tp, struct port_input *pi) { struct udp_port *p = (struct udp_port *)tp; + struct cmsghdr *cmsgp; struct in_addr *laddr; struct msghdr msg; char cbuf[CMSG_SPACE(sizeof(struct in_addr))]; - struct cmsghdr *cmsgp; ssize_t ret; memset(cbuf, 0, sizeof(cbuf));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701160708.v0G786Io004548>