summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-07 20:10:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-07 20:10:15 (GMT)
commit9aea48988c29a181e815be248de624c7bf29d5bc (patch)
tree782303a0ba8c6f094791e58ee5916c56c100de59 /unix
parentfffb0bdce5640858681e04fc97778664ef2a0e43 (diff)
parent0e0d74624b670cf813951e61b3025182d9d0398b (diff)
downloadtcl-9aea48988c29a181e815be248de624c7bf29d5bc.zip
tcl-9aea48988c29a181e815be248de624c7bf29d5bc.tar.gz
tcl-9aea48988c29a181e815be248de624c7bf29d5bc.tar.bz2
Merge 8.7
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixSock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 864d477..c16b081 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -1030,10 +1030,10 @@ TcpGetOptionProc(
if ((len == 0) || ((len > 1) && (optionName[1] == 'k') &&
(strncmp(optionName, "-keepalive", len) == 0))) {
+ int opt = 0;
#if defined(SO_KEEPALIVE)
- socklen_t size;
+ socklen_t size = sizeof(opt);
#endif
- int opt = 0;
if (len == 0) {
Tcl_DStringAppendElement(dsPtr, "-keepalive");
@@ -1050,10 +1050,10 @@ TcpGetOptionProc(
if ((len == 0) || ((len > 1) && (optionName[1] == 'n') &&
(strncmp(optionName, "-nodelay", len) == 0))) {
+ int opt = 0;
#if defined(SOL_TCP) && defined(TCP_NODELAY)
- socklen_t size;
+ socklen_t size = sizeof(opt);
#endif
- int opt = 0;
if (len == 0) {
Tcl_DStringAppendElement(dsPtr, "-nodelay");