summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-10-23 10:53:41 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-10-23 10:53:41 (GMT)
commitf833c48881b0c5016ed36b5132c0a0e88aa6a487 (patch)
tree61c4572931f64207034d3efc5088b9cc1020512c /win/tclWinSock.c
parentdd5c058db2f142f387695f101f9f6a9ea952bed4 (diff)
parent12d41d9775ba943e85a44f58c5930463712eca1f (diff)
downloadtcl-f833c48881b0c5016ed36b5132c0a0e88aa6a487.zip
tcl-f833c48881b0c5016ed36b5132c0a0e88aa6a487.tar.gz
tcl-f833c48881b0c5016ed36b5132c0a0e88aa6a487.tar.bz2
Merge 8.7
Diffstat (limited to 'win/tclWinSock.c')
-rw-r--r--win/tclWinSock.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/win/tclWinSock.c b/win/tclWinSock.c
index 2174210..20ba019 100644
--- a/win/tclWinSock.c
+++ b/win/tclWinSock.c
@@ -1195,15 +1195,14 @@ TcpSetOptionProc(
if ((len > 1) && (optionName[1] == 'k') &&
(strncmp(optionName, "-keepalive", len) == 0)) {
- BOOL val;
- int boolVar, rtn;
+ BOOL boolVar;
+ int rtn;
if (Tcl_GetBoolean(interp, value, &boolVar) != TCL_OK) {
return TCL_ERROR;
}
- val = boolVar ? TRUE : FALSE;
rtn = setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE,
- (const char *) &val, sizeof(BOOL));
+ (const char *) &boolVar, sizeof(boolVar));
if (rtn != 0) {
Tcl_WinConvertError(WSAGetLastError());
if (interp) {
@@ -1217,15 +1216,14 @@ TcpSetOptionProc(
}
if ((len > 1) && (optionName[1] == 'n') &&
(strncmp(optionName, "-nodelay", len) == 0)) {
- BOOL val;
- int boolVar, rtn;
+ BOOL boolVar;
+ int rtn;
if (Tcl_GetBoolean(interp, value, &boolVar) != TCL_OK) {
return TCL_ERROR;
}
- val = boolVar ? TRUE : FALSE;
rtn = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
- (const char *) &val, sizeof(BOOL));
+ (const char *) &boolVar, sizeof(boolVar));
if (rtn != 0) {
Tcl_WinConvertError(WSAGetLastError());
if (interp) {