Skip to content
Snippets Groups Projects
Commit 24bca4a1 authored by Alessio Igor Bogani's avatar Alessio Igor Bogani
Browse files

Avoid useless conversion

parent 35ecb605
No related branches found
No related tags found
No related merge requests found
......@@ -682,7 +682,7 @@ void Socket2::open()
if (proto == TCP) {
int flag = 1;
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char*)&flag,
if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag,
sizeof(flag)) == -1) {
::close(fd);
ERROR_STREAM << "Disabling Nagle failed: "
......@@ -691,7 +691,7 @@ void Socket2::open()
}
flag = 1;
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&flag,
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &flag,
sizeof(flag)) == -1) {
::close(fd);
ERROR_STREAM << "Enabling reuseaddr flag failed: "
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment