summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/main.c b/main.c
index b686980..e398b51 100644
--- a/main.c
+++ b/main.c
@@ -55,8 +55,7 @@ static int ConnectSocket(const char* arg) {
LOG("Failed to create socket (%s)", strerror(errno));
return -1;
}
- static const int one = 1;
- if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &one, sizeof(one))) {
+ if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &(int){1}, sizeof(int))) {
LOG("Failed to set TCP_NODELAY (%s)", strerror(errno));
goto rollback_sock;
}