Skip to content

Commit

Permalink
Fix compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
zbalaton committed Sep 25, 2018
1 parent 07a493a commit 6d66394
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ int socket_connect_unix(const char *filename)
return -1;
}

if (setsockopt(sfd, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(int)) == -1) {
if (setsockopt(sfd, SOL_SOCKET, SO_SNDBUF, (void*)&bufsize, sizeof(int)) == -1) {
perror("Could not set send buffer for socket");
}

if (setsockopt(sfd, SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(int)) == -1) {
if (setsockopt(sfd, SOL_SOCKET, SO_RCVBUF, (void*)&bufsize, sizeof(int)) == -1) {
perror("Could not set receive buffer for socket");
}

Expand Down Expand Up @@ -275,11 +275,11 @@ int socket_connect(const char *addr, uint16_t port)
perror("Could not set TCP_NODELAY on socket");
}

if (setsockopt(sfd, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(int)) == -1) {
if (setsockopt(sfd, SOL_SOCKET, SO_SNDBUF, (void*)&bufsize, sizeof(int)) == -1) {
perror("Could not set send buffer for socket");
}

if (setsockopt(sfd, SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(int)) == -1) {
if (setsockopt(sfd, SOL_SOCKET, SO_RCVBUF, (void*)&bufsize, sizeof(int)) == -1) {
perror("Could not set receive buffer for socket");
}

Expand Down

0 comments on commit 6d66394

Please sign in to comment.