We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1800e25 commit 82c51daCopy full SHA for 82c51da
1 file changed
src/comm/Tcp.cc
@@ -30,7 +30,7 @@ SetSocketOption(const int fd, const int level, const int optName, const Option &
30
{
31
static_assert(std::is_trivially_copyable<Option>::value, "setsockopt() expects POD-like options");
32
static_assert(!std::is_same<Option, bool>::value, "setsockopt() uses int to represent boolean options");
33
- if (setsockopt(fd, level, optName, &optValue, sizeof(optValue)) < 0) {
+ if (setsockopt(fd, level, optName, reinterpret_cast<const char *>(&optValue), sizeof(optValue)) < 0) {
34
const auto xerrno = errno;
35
debugs(5, DBG_IMPORTANT, "ERROR: setsockopt(2) failure: " << xstrerr(xerrno));
36
// TODO: Generalize to throw on errors when some callers need that.
0 commit comments