summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-09-04 07:22:45 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-09-04 07:22:45 (GMT)
commit9878106deb1fb3cf0c6c338f006ca9b168162eb7 (patch)
treee80d5f727d70e081a7dc7285b869d914aa1eb186 /generic/tclUtil.c
parent54223a5f7e90edf67dcf3332c655723eb272ac93 (diff)
downloadtcl-9878106deb1fb3cf0c6c338f006ca9b168162eb7.zip
tcl-9878106deb1fb3cf0c6c338f006ca9b168162eb7.tar.gz
tcl-9878106deb1fb3cf0c6c338f006ca9b168162eb7.tar.bz2
Fix 3 trivial (possible) errors, discovered by covertity.com
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 27e2474..b089132 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -3580,10 +3580,9 @@ UpdateStringOfEndOffset(
register Tcl_Obj *objPtr)
{
char buffer[TCL_INTEGER_SPACE + 5];
- register int len;
+ register int len = 3;
memcpy(buffer, "end", 4);
- len = sizeof("end") - 1;
if (objPtr->internalRep.longValue != 0) {
buffer[len++] = '-';
len += TclFormatInt(buffer+len, -(objPtr->internalRep.longValue));