summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclStringObj.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 8f4bfb2..d1e709c 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -956,9 +956,9 @@ Tcl_SetObjLength(
* Need to enlarge the buffer.
*/
if (objPtr->bytes == tclEmptyStringRep) {
- objPtr->bytes = (char *)ckalloc(length + 1);
+ objPtr->bytes = (char *)ckalloc((unsigned int)length + 1U);
} else {
- objPtr->bytes = (char *)ckrealloc(objPtr->bytes, length + 1);
+ objPtr->bytes = (char *)ckrealloc(objPtr->bytes, (unsigned int)length + 1U);
}
stringPtr->allocated = length;
}
@@ -1062,9 +1062,9 @@ Tcl_AttemptSetObjLength(
char *newBytes;
if (objPtr->bytes == tclEmptyStringRep) {
- newBytes = (char *)attemptckalloc(length + 1);
+ newBytes = (char *)attemptckalloc((unsigned int)length + 1U);
} else {
- newBytes = (char *)attemptckrealloc(objPtr->bytes, length + 1);
+ newBytes = (char *)attemptckrealloc(objPtr->bytes, (unsigned int)length + 1U);
}
if (newBytes == NULL) {
return 0;