summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-05-27 12:49:05 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-05-27 12:49:05 (GMT)
commit168a0bba1650102be5923b6e26a769019cee094a (patch)
treefc6c34f6a94f422e2381440eb991993f8c5b5d16 /generic/tclUtil.c
parent020fea0acd1d6213f31169581c9fb02bc5a9f82b (diff)
parent50f0f668e5ac2393dd2e8200726bc0ac3efb6d03 (diff)
downloadtcl-168a0bba1650102be5923b6e26a769019cee094a.zip
tcl-168a0bba1650102be5923b6e26a769019cee094a.tar.gz
tcl-168a0bba1650102be5923b6e26a769019cee094a.tar.bz2
Merge 8.7. Modify various other functions to use size_t in stead of int arguments
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 59f6c99..bcd9e90 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -2854,14 +2854,11 @@ Tcl_DStringAppendElement(
void
Tcl_DStringSetLength(
Tcl_DString *dsPtr, /* Structure describing dynamic string. */
- int length) /* New length for dynamic string. */
+ size_t length) /* New length for dynamic string. */
{
- int newsize;
+ size_t newsize;
- if (length < 0) {
- length = 0;
- }
- if (length >= dsPtr->spaceAvl) {
+ if (length >= (size_t)dsPtr->spaceAvl) {
/*
* There are two interesting cases here. In the first case, the user
* may be trying to allocate a large buffer of a specific size. It