summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-08-16 13:55:06 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-08-16 13:55:06 (GMT)
commit754781a8ca6a7ff2617e2dea8f8fc569c868445e (patch)
treedfac520f6bcb71143cd81124598bdb9d07e00d0b /generic/tclCmdIL.c
parent0769533296f892df58d869c9d898a51f9a7ca1bf (diff)
downloadtcl-754781a8ca6a7ff2617e2dea8f8fc569c868445e.zip
tcl-754781a8ca6a7ff2617e2dea8f8fc569c868445e.tar.gz
tcl-754781a8ca6a7ff2617e2dea8f8fc569c868445e.tar.bz2
Small changes to quell gcc warnings and make message generation less ugly.
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 64348ad..95532d3 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -4446,12 +4446,9 @@ SelectObjFromSublist(
return NULL;
}
if (currentObj == NULL) {
- char buffer[TCL_INTEGER_SPACE];
-
- TclFormatInt(buffer, index);
- Tcl_AppendResult(infoPtr->interp, "element ", buffer,
- " missing from sublist \"", TclGetString(objPtr), "\"",
- NULL);
+ Tcl_SetObjResult(infoPtr->interp, Tcl_ObjPrintf(
+ "element %d missing from sublist \"%s\"",
+ index, TclGetString(objPtr)));
Tcl_SetErrorCode(infoPtr->interp, "TCL", "OPERATION", "LSORT",
"INDEXFAILED", NULL);
infoPtr->resultCode = TCL_ERROR;