summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2010-03-05 14:34:03 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2010-03-05 14:34:03 (GMT)
commitb501910778714de837dc4367698256e996737e9b (patch)
treef2dc6d4861ea238a538f41c4306249dad1ac3ea5 /generic/tclCmdIL.c
parentf7a64b3a111891d5f7f79ce94bbb37abedd30176 (diff)
downloadtcl-b501910778714de837dc4367698256e996737e9b.zip
tcl-b501910778714de837dc4367698256e996737e9b.tar.gz
tcl-b501910778714de837dc4367698256e996737e9b.tar.bz2
Code Audit results:
* use do { ... } while (0) in macros * avoid shadowing one local variable with another * use clearer 'foo.bar++;' instead of '++foo.bar;' where result not required (i.e., semantically equivalent) * follow Engineering Manual rules on spacing and declarations
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 85f9696..d063014 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -16,7 +16,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCmdIL.c,v 1.179 2010/02/28 21:15:11 dkf Exp $
+ * RCS: @(#) $Id: tclCmdIL.c,v 1.180 2010/03/05 14:34:03 dkf Exp $
*/
#include "tclInt.h"
@@ -3610,7 +3610,7 @@ Tcl_LsortObjCmd(
sortInfo.isIncreasing = 1;
break;
case LSORT_INDEX: {
- Tcl_Obj **indices;
+ Tcl_Obj **indexv;
/* === START SPECIAL CASE ===
*
@@ -3634,7 +3634,7 @@ Tcl_LsortObjCmd(
*/
if (TclListObjGetElements(interp, objv[i+1], &sortInfo.indexc,
- &indices) != TCL_OK) {
+ &indexv) != TCL_OK) {
return TCL_ERROR;
}
/* === END SPECIAL CASE === */
@@ -3661,7 +3661,7 @@ Tcl_LsortObjCmd(
*/
for (j=0 ; j<sortInfo.indexc ; j++) {
- if (TclGetIntForIndexM(interp, indices[j], SORTIDX_END,
+ if (TclGetIntForIndexM(interp, indexv[j], SORTIDX_END,
&sortInfo.indexv[j]) != TCL_OK) {
Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
"\n (-index option item number %d)", j));
@@ -3922,7 +3922,6 @@ Tcl_LsortObjCmd(
if (sortInfo.resultCode == TCL_OK) {
List *listRepPtr;
Tcl_Obj **newArray, *objPtr;
- int i;
resultPtr = Tcl_NewListObj(sortInfo.numElements * groupSize, NULL);
listRepPtr = resultPtr->internalRep.twoPtrValue.ptr1;