Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jan 2017 01:38:07 +0000 (UTC)
From:      Ngie Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r311221 - head/contrib/bsnmp/snmpd
Message-ID:  <201701040138.v041c75C009737@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Jan  4 01:38:07 2017
New Revision: 311221
URL: https://svnweb.freebsd.org/changeset/base/311221

Log:
  Initialize msg.msg_flags to 0
  
  This mutes a valid coverity warning about it being uninitialized
  when passed in to sendmsg(2).
  
  MFC after:	2 weeks
  Reported by:	Coverity
  CID:		1368202

Modified:
  head/contrib/bsnmp/snmpd/trans_udp.c

Modified: head/contrib/bsnmp/snmpd/trans_udp.c
==============================================================================
--- head/contrib/bsnmp/snmpd/trans_udp.c	Wed Jan  4 01:23:15 2017	(r311220)
+++ head/contrib/bsnmp/snmpd/trans_udp.c	Wed Jan  4 01:38:07 2017	(r311221)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701040138.v041c75C009737>