summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2002-09-03 02:01:41 (GMT)
committerhobbs <hobbs>2002-09-03 02:01:41 (GMT)
commit5a8a55b2e015c916bca8caba18015187182278c0 (patch)
treee8b0e30007acf89fdbda00810bf0cb9e927e6494
parent932468bb63beb53d592b88af2b45c2287a8ad3a2 (diff)
downloadtcl-5a8a55b2e015c916bca8caba18015187182278c0.zip
tcl-5a8a55b2e015c916bca8caba18015187182278c0.tar.gz
tcl-5a8a55b2e015c916bca8caba18015187182278c0.tar.bz2
* unix/tclUnixFile.c (TclpObjLink): removed unnecessary/unfreed
extra native char*.
-rw-r--r--ChangeLog6
-rw-r--r--unix/tclUnixFile.c17
2 files changed, 10 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 7efdb13..198ecd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2002-09-02 Jeff Hobbs <jeffh@ActiveState.com>
+ * unix/tclUnixFile.c (TclpObjLink): removed unnecessary/unfreed
+ extra native char*.
+
+ * unix/tclUnixChan.c (Tcl_MakeTcpClientChannel): make sure to init
+ flags field of TcpState ptr to 0.
+
* unix/configure:
* unix/tcl.m4: added 64-bit gcc compilation support on HP-11.
[Patch #601051] (martin)
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 3105d21..0fe97d6 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixFile.c,v 1.27 2002/07/20 01:01:41 vincentdarley Exp $
+ * RCS: @(#) $Id: tclUnixFile.c,v 1.28 2002/09/03 02:01:42 hobbs Exp $
*/
#include "tclInt.h"
@@ -764,9 +764,8 @@ TclpObjLink(pathPtr, toPtr, linkAction)
char link[MAXPATHLEN];
int length;
- char *native;
Tcl_DString ds;
-
+
if (Tcl_FSGetTranslatedPath(NULL, pathPtr) == NULL) {
return NULL;
}
@@ -774,16 +773,8 @@ TclpObjLink(pathPtr, toPtr, linkAction)
if (length < 0) {
return NULL;
}
-
- /*
- * Allocate and copy the name, taking care since the
- * name need not be null terminated.
- */
- native = (char*)ckalloc((unsigned)(1+length));
- strncpy(native, link, (unsigned)length);
- native[length] = '\0';
-
- Tcl_ExternalToUtfDString(NULL, native, length, &ds);
+
+ Tcl_ExternalToUtfDString(NULL, link, length, &ds);
linkPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds),
Tcl_DStringLength(&ds));
Tcl_DStringFree(&ds);