Skip to content

Commit 79dc59e

Browse files
use const int instead
1 parent ee050c0 commit 79dc59e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/dpp/sslconnection.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ bool close_socket(dpp::socket sfd)
107107

108108
bool set_nonblocking(dpp::socket sockfd, bool non_blocking)
109109
{
110-
static int enable{1};
110+
const int enable{1};
111111
#ifdef _WIN32
112112
u_long mode = non_blocking ? 1 : 0;
113113
int result = ioctlsocket(sockfd, FIONBIO, &mode);
@@ -125,7 +125,7 @@ bool set_nonblocking(dpp::socket sockfd, bool non_blocking)
125125
return false;
126126
}
127127
#endif
128-
setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<char*>(&enable), sizeof(int));
128+
setsockopt(sockfd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<const char*>(&enable), sizeof(int));
129129
return true;
130130
}
131131

0 commit comments

Comments
 (0)