diff options
author | Daniel Stenberg <daniel@haxx.se> | 2011-09-09 15:20:31 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-09-09 15:31:11 +0200 |
commit | 303c90074d4cfe1d79c7478838dc5fe01477af00 (patch) | |
tree | d097d4b4aac3a64c7bdfe96c92470b850f0ec605 | |
parent | 443ab77e1fefcaa8bdcd94df79617b43c024248f (diff) |
tcpnodelay: rename variable
Renamed the variable from 'proto' to 'level' simply because it is not
protocol you set but level and that is the name of the argument used in
man pages and the POSIX documentation of the setsockopt function.
-rw-r--r-- | lib/connect.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/connect.c b/lib/connect.c index df304fc62..7f0171f46 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -747,7 +747,7 @@ static void tcpnodelay(struct connectdata *conn, #ifdef TCP_NODELAY struct SessionHandle *data= conn->data; curl_socklen_t onoff = (curl_socklen_t) data->set.tcp_nodelay; - int proto = IPPROTO_TCP; + int level = IPPROTO_TCP; #if 0 /* The use of getprotobyname() is disabled since it isn't thread-safe on @@ -759,10 +759,10 @@ static void tcpnodelay(struct connectdata *conn, detected. */ struct protoent *pe = getprotobyname("tcp"); if(pe) - proto = pe->p_proto; + level = pe->p_proto; #endif - if(setsockopt(sockfd, proto, TCP_NODELAY, (void *)&onoff, + if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff, sizeof(onoff)) < 0) infof(data, "Could not set TCP_NODELAY: %s\n", Curl_strerror(conn, SOCKERRNO)); |