summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixSock.c')
-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");