From owner-svn-src-stable@freebsd.org Mon Jan 16 07:08:07 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8FC6CB1D89; Mon, 16 Jan 2017 07:08:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A63211011; Mon, 16 Jan 2017 07:08:07 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0G786Sj004549; Mon, 16 Jan 2017 07:08:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0G786Io004548; Mon, 16 Jan 2017 07:08:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201701160708.v0G786Io004548@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Ngie Cooper Date: Mon, 16 Jan 2017 07:08:06 +0000 (UTC) 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 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2017 07:08:08 -0000 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));