summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2013-09-16 18:59:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2013-09-16 18:59:14 (GMT)
commitb0e7980ba4b61bfc9867143b3a08fe0d74894690 (patch)
treebeaad334c814a35e3e90e6297ed8886ee837c853 /unix
parentee5dada68d84581a9b0c3ac970c11b862f0eb186 (diff)
parentfe8ae4eafcd82339318ba2c288431d00bbee06d9 (diff)
downloadtcl-b0e7980ba4b61bfc9867143b3a08fe0d74894690.zip
tcl-b0e7980ba4b61bfc9867143b3a08fe0d74894690.tar.gz
tcl-b0e7980ba4b61bfc9867143b3a08fe0d74894690.tar.bz2
merge trunk; update changes
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixFCmd.c4
-rw-r--r--unix/tclUnixSock.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index e27f78f..e270b6a 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -462,10 +462,10 @@ DoCopyFile(
switch ((int) (statBufPtr->st_mode & S_IFMT)) {
#ifndef DJGPP
case S_IFLNK: {
- char linkBuf[MAXPATHLEN];
+ char linkBuf[MAXPATHLEN+1];
int length;
- length = readlink(src, linkBuf, sizeof(linkBuf));
+ length = readlink(src, linkBuf, MAXPATHLEN);
/* INTL: Native. */
if (length == -1) {
return TCL_ERROR;
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 9c3d7eb..a6360c2 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -1358,6 +1358,7 @@ Tcl_OpenTcpServer(
my_errno = errno;
}
close(sock);
+ sock = -1;
continue;
}
if (port == 0 && chosenport == 0) {
@@ -1380,6 +1381,7 @@ Tcl_OpenTcpServer(
my_errno = errno;
}
close(sock);
+ sock = -1;
continue;
}
if (statePtr == NULL) {