You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2017/05/11 13:41:13 UTC
[trafficserver] 05/11: Wccp: CV-1268005, CV-1268006, CV-1268007,
CV-1268010
This is an automated email from the ASF dual-hosted git repository.
sorber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
commit 8a7956a56645b92763498d7775863a9d57fdc6ac
Author: Alan M. Carroll <am...@apache.org>
AuthorDate: Wed May 10 10:49:05 2017 -0500
Wccp: CV-1268005,CV-1268006,CV-1268007,CV-1268010
---
lib/wccp/WccpEndPoint.cc | 5 +----
lib/wccp/WccpLocal.h | 24 +++++++++---------------
lib/wccp/WccpMsg.cc | 2 +-
3 files changed, 11 insertions(+), 20 deletions(-)
diff --git a/lib/wccp/WccpEndPoint.cc b/lib/wccp/WccpEndPoint.cc
index 28a2d26..e89992b 100644
--- a/lib/wccp/WccpEndPoint.cc
+++ b/lib/wccp/WccpEndPoint.cc
@@ -61,10 +61,6 @@ Impl::GroupData::setSecurity(SecurityOption style)
return *this;
}
-Impl::Impl() : m_addr(INADDR_ANY), m_fd(ts::NO_FD)
-{
-}
-
Impl::~Impl()
{
this->close();
@@ -215,6 +211,7 @@ Impl::handleMessage()
recv_hdr.msg_iovlen = 1;
recv_hdr.msg_control = anc_buffer;
recv_hdr.msg_controllen = ANC_BUFFER_SIZE;
+ recv_hdr.msg_flags = 0; // output only, make Coverity shut up.
// coverity[uninit_use_in_call]
n = recvmsg(m_fd, &recv_hdr, MSG_TRUNC);
diff --git a/lib/wccp/WccpLocal.h b/lib/wccp/WccpLocal.h
index 761df93..1de551f 100644
--- a/lib/wccp/WccpLocal.h
+++ b/lib/wccp/WccpLocal.h
@@ -327,7 +327,7 @@ public:
/// Capability types.
enum Type : uint16_t {
- NO_METHOD = 0; ///< Method not set.
+ NO_METHOD = 0, ///< Method not set.
PACKET_FORWARD_METHOD = 1, ///< Packet forwarding methods.
CACHE_ASSIGNMENT_METHOD = 2, ///< Cache assignment methods.
PACKET_RETURN_METHOD = 3 ///< Packet return methods.
@@ -577,9 +577,6 @@ class MaskAssignElt
public:
typedef MaskAssignElt self; ///< Self reference type.
- /// Default constructor - @b no initialization.
- MaskAssignElt();
-
/** A minimalist insert iterator.
*/
struct appender {
@@ -626,7 +623,7 @@ public:
size_t getVarSize() const;
protected:
- uint32_t m_count; ///< # of sets (network order).
+ uint32_t m_count = 0; ///< # of sets (network order).
friend struct appender;
};
@@ -2194,7 +2191,7 @@ public:
typedef detail::endpoint::GroupData GroupData;
/// Default constructor.
- Impl();
+ Impl() = default;
/** Set the local address used for this endpoint.
If not set, an arbitrary local address will be
@note This can only be called once, and must be called before
@@ -2251,13 +2248,13 @@ protected:
/** Local address for this end point.
This is set only when the socket is open.
*/
- uint32_t m_addr;
- int m_fd; ///< Our socket.
+ uint32_t m_addr = INADDR_ANY;
+ int m_fd = ts::NO_FD; ///< Our socket.
- bool m_use_security_opt; ///< Use group local security.
- SecurityComp::Option m_security_opt; ///< Type of security.
- bool m_use_security_key; ///< Use group local key.
- SecurityComp::Key m_security_key; ///< MD5 key.
+ bool m_use_security_opt = false; ///< Use group local security.
+ SecurityComp::Option m_security_opt = SECURITY_NONE; ///< Type of security.
+ bool m_use_security_key = false; ///< Use group local key.
+ SecurityComp::Key m_security_key; ///< MD5 key.
/// Close the socket.
void close();
@@ -3463,9 +3460,6 @@ inline HashAssignElt::Bucket const &HashAssignElt::operator[](size_t idx) const
return (*(const_cast<self *>(this)))[idx];
}
-inline MaskAssignElt::MaskAssignElt()
-{
-}
inline uint32_t
MaskAssignElt::getCount() const
{
diff --git a/lib/wccp/WccpMsg.cc b/lib/wccp/WccpMsg.cc
index d03283b..4544e1b 100644
--- a/lib/wccp/WccpMsg.cc
+++ b/lib/wccp/WccpMsg.cc
@@ -202,7 +202,7 @@ CapabilityElt::getCapType() const
inline CapabilityElt &
CapabilityElt::setCapType(Type cap)
{
- m_cap_type = htons(cap);
+ m_cap_type = static_cast<Type>(htons(cap));
return *this;
}
--
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.