Skip to content

Commit

Permalink
[transport] define value only once
Browse files Browse the repository at this point in the history
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
  • Loading branch information
fabbione committed Feb 7, 2017
1 parent 7d1fd98 commit 91a7fd6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libknet/transport_common.c
Expand Up @@ -36,8 +36,8 @@ int _configure_common_socket(knet_handle_t knet_h, int sock, const char *type)
goto exit_error;
}

#ifdef SO_RCVBUFFORCE
value = KNET_RING_RCVBUFF;
#ifdef SO_RCVBUFFORCE
if (setsockopt(sock, SOL_SOCKET, SO_RCVBUFFORCE, &value, sizeof(value)) < 0) {
savederrno = errno;
err = -1;
Expand All @@ -46,7 +46,6 @@ int _configure_common_socket(knet_handle_t knet_h, int sock, const char *type)
goto exit_error;
}
#else
value = KNET_RING_RCVBUFF;
if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, &value, sizeof(value)) < 0) {
savederrno = errno;
err = -1;
Expand Down

0 comments on commit 91a7fd6

Please sign in to comment.