Fix some trivial issues reported by cppcheck

This commit is contained in:
Florent Le Coz
2015-10-26 20:09:39 +01:00
parent 0fcba76c79
commit 142516a69b
4 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ void TCPSocketHandler::on_send()
struct msghdr msg{nullptr, 0,
msg_iov,
0, nullptr, 0, 0};
for (std::string& s: this->out_buf)
for (const std::string& s: this->out_buf)
{
// unconsting the content of s is ok, sendmsg will never modify it
msg_iov[msg.msg_iovlen].iov_base = const_cast<char*>(s.data());