summaryrefslogtreecommitdiffstats
path: root/generic/tclListObj.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2006-11-08 13:47:07 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2006-11-08 13:47:07 (GMT)
commitd3c98cb4ac5b38b9fadbe00e5b9161c19d4d4ea7 (patch)
treecc93cb1911ea79684d6cc07b4bc9e9dcd9fca528 /generic/tclListObj.c
parentbcc3af0abdf3eaf53e455eff2df0907274932a85 (diff)
downloadtcl-d3c98cb4ac5b38b9fadbe00e5b9161c19d4d4ea7.zip
tcl-d3c98cb4ac5b38b9fadbe00e5b9161c19d4d4ea7.tar.gz
tcl-d3c98cb4ac5b38b9fadbe00e5b9161c19d4d4ea7.tar.bz2
Minor simplification of memcpy usage
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r--generic/tclListObj.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 3329dae..9f15cd2 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclListObj.c,v 1.33 2006/08/10 12:15:31 dkf Exp $
+ * RCS: @(#) $Id: tclListObj.c,v 1.34 2006/11/08 13:47:07 dkf Exp $
*/
#include "tclInt.h"
@@ -859,8 +859,7 @@ Tcl_ListObjReplace(
*/
if (first > 0) {
- memcpy((VOID *) elemPtrs, (VOID *) oldPtrs,
- (size_t) (first * sizeof(Tcl_Obj *)));
+ memcpy(elemPtrs, oldPtrs, (size_t) first * sizeof(Tcl_Obj *));
}
/*
@@ -880,9 +879,8 @@ Tcl_ListObjReplace(
start = (first + count);
numAfterLast = (numElems - start);
if (numAfterLast > 0) {
- memcpy((VOID *) &(elemPtrs[first + objc]),
- (VOID *) &(oldPtrs[start]),
- (size_t) (numAfterLast * sizeof(Tcl_Obj *)));
+ memcpy(elemPtrs + first + objc, oldPtrs + start,
+ (size_t) numAfterLast * sizeof(Tcl_Obj *));
}
ckfree((char *) oldListRepPtr);
@@ -1563,7 +1561,7 @@ SetListFromAny(
s = ckalloc((unsigned) elemSize + 1);
if (hasBrace) {
- memcpy((void *) s, (void *) elemStart, (size_t) elemSize);
+ memcpy(s, elemStart, (size_t) elemSize);
s[elemSize] = 0;
} else {
elemSize = TclCopyAndCollapse(elemSize, elemStart, s);