diff options
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 9 |
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 |