summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-11-22 09:23:16 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-11-22 09:23:16 (GMT)
commit843754ace381ee3547f5752bbc84d0bb065367e1 (patch)
tree20dd872f84be6bfbea66505870ca099489a2c3d7 /unix
parent802d3d1aa0b9c547056aa924a20fb7c49f69abb4 (diff)
downloadtcl-843754ace381ee3547f5752bbc84d0bb065367e1.zip
tcl-843754ace381ee3547f5752bbc84d0bb065367e1.tar.gz
tcl-843754ace381ee3547f5752bbc84d0bb065367e1.tar.bz2
Fix encoding handling (check for TCL_IO_FAILURE was wrong). Eliminate (size_t) type casts and use of ckalloc() -> Tcl_Alloc()
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixSock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 5db07a5..23ef1ba 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -283,11 +283,11 @@ InitializeHostName(
*encodingPtr = Tcl_GetEncoding(NULL, NULL);
if (native) {
*lengthPtr = strlen(native);
- *valuePtr = ckalloc(*lengthPtr + 1);
+ *valuePtr = Tcl_Alloc(*lengthPtr + 1);
memcpy(*valuePtr, native, *lengthPtr + 1);
} else {
*lengthPtr = 0;
- *valuePtr = ckalloc(1);
+ *valuePtr = Tcl_Alloc(1);
*valuePtr[0] = '\0';
}
}