diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclAlloc.c | 4 | ||||
-rw-r--r-- | generic/tclCompExpr.c | 6 | ||||
-rw-r--r-- | generic/tclEncoding.c | 16 | ||||
-rw-r--r-- | generic/tclFileName.c | 4 | ||||
-rw-r--r-- | generic/tclHash.c | 23 | ||||
-rw-r--r-- | generic/tclIOGT.c | 11 | ||||
-rw-r--r-- | generic/tclPathObj.c | 6 |
7 files changed, 35 insertions, 35 deletions
diff --git a/generic/tclAlloc.c b/generic/tclAlloc.c index b51084d..df6db05 100644 --- a/generic/tclAlloc.c +++ b/generic/tclAlloc.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclAlloc.c,v 1.23 2005/11/01 15:30:52 dkf Exp $ + * RCS: @(#) $Id: tclAlloc.c,v 1.24 2007/04/17 14:49:53 dkf Exp $ */ /* @@ -615,7 +615,7 @@ TclpRealloc( if (maxSize < numBytes) { numBytes = maxSize; } - memcpy((VOID *) newPtr, (VOID *) oldPtr, (size_t) numBytes); + memcpy(newPtr, oldPtr, (size_t) numBytes); TclpFree(oldPtr); return newPtr; } diff --git a/generic/tclCompExpr.c b/generic/tclCompExpr.c index 0043b65..e5cddb3 100644 --- a/generic/tclCompExpr.c +++ b/generic/tclCompExpr.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: tclCompExpr.c,v 1.49 2007/04/10 14:47:10 dkf Exp $ + * RCS: @(#) $Id: tclCompExpr.c,v 1.50 2007/04/17 14:49:53 dkf Exp $ */ #include "tclInt.h" @@ -1858,7 +1858,7 @@ GenerateTokens( destPtr->type = TCL_TOKEN_WORD; destPtr->numComponents = toCopy; destPtr++; - memcpy((VOID *) destPtr, (VOID *) sourcePtr, + memcpy(destPtr, sourcePtr, (size_t) (toCopy * sizeof(Tcl_Token))); parsePtr->numTokens += toCopy + 2; break; @@ -1876,7 +1876,7 @@ GenerateTokens( TclExpandTokenArray(parsePtr); } destPtr = parsePtr->tokenPtr + parsePtr->numTokens; - memcpy((VOID *) destPtr, (VOID *) sourcePtr, + memcpy(destPtr, sourcePtr, (size_t) (toCopy * sizeof(Tcl_Token))); parsePtr->numTokens += toCopy; break; diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 120bf59..d0465aa 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.54 2007/04/10 22:14:30 dkf Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.55 2007/04/17 14:49:53 dkf Exp $ */ #include "tclInt.h" @@ -1948,7 +1948,7 @@ LoadEscapeEncoding( strcpy(dataPtr->final, final); dataPtr->numSubTables = Tcl_DStringLength(&escapeData) / sizeof(EscapeSubTable); - memcpy((VOID *) dataPtr->subTables, (VOID *) Tcl_DStringValue(&escapeData), + memcpy(dataPtr->subTables, Tcl_DStringValue(&escapeData), (size_t) Tcl_DStringLength(&escapeData)); Tcl_DStringFree(&escapeData); @@ -2986,7 +2986,7 @@ EscapeFromUtfProc( *dstWrotePtr = 0; return TCL_CONVERT_NOSPACE; } - memcpy((VOID *)dst, (VOID *)dataPtr->init, (size_t)dataPtr->initLen); + memcpy(dst, dataPtr->init, (size_t)dataPtr->initLen); dst += dataPtr->initLen; } else { state = PTR2INT(*statePtr); @@ -3062,7 +3062,7 @@ EscapeFromUtfProc( result = TCL_CONVERT_NOSPACE; break; } - memcpy((VOID *) dst, (VOID *) subTablePtr->sequence, + memcpy(dst, subTablePtr->sequence, (size_t) subTablePtr->sequenceLen); dst += subTablePtr->sequenceLen; } @@ -3103,12 +3103,10 @@ EscapeFromUtfProc( result = TCL_CONVERT_NOSPACE; } else { if (state) { - memcpy((VOID *) dst, (VOID *) dataPtr->subTables[0].sequence, - (size_t) len); + memcpy(dst, dataPtr->subTables[0].sequence, (size_t) len); dst += len; } - memcpy((VOID *) dst, (VOID *) dataPtr->final, - (size_t) dataPtr->finalLen); + memcpy(dst, dataPtr->final, (size_t) dataPtr->finalLen); dst += dataPtr->finalLen; state &= ~TCL_ENCODING_END; } @@ -3297,7 +3295,7 @@ InitializeEncodingSearchPath( *lengthPtr = numBytes; *valuePtr = ckalloc((unsigned int) numBytes + 1); - memcpy((VOID *) *valuePtr, (VOID *) bytes, (size_t) numBytes + 1); + memcpy(*valuePtr, bytes, (size_t) numBytes + 1); Tcl_DecrRefCount(searchPath); } diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 4de4604..6d574aa 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.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: tclFileName.c,v 1.81 2007/04/10 22:01:57 dkf Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.82 2007/04/17 14:49:53 dkf Exp $ */ #include "tclInt.h" @@ -580,7 +580,7 @@ Tcl_SplitPath( for (i = 0; i < *argcPtr; i++) { Tcl_ListObjIndex(NULL, resultPtr, i, &eltPtr); str = Tcl_GetStringFromObj(eltPtr, &len); - memcpy((VOID *) p, (VOID *) str, (size_t) len+1); + memcpy(p, str, (size_t) len+1); p += len+1; } diff --git a/generic/tclHash.c b/generic/tclHash.c index 542e89c..8be7d1f 100644 --- a/generic/tclHash.c +++ b/generic/tclHash.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: tclHash.c,v 1.28 2007/02/20 23:24:04 nijtmans Exp $ + * RCS: @(#) $Id: tclHash.c,v 1.29 2007/04/17 14:49:53 dkf Exp $ */ #include "tclInt.h" @@ -322,7 +322,7 @@ Tcl_CreateHashEntry( #endif if (typePtr->hashKeyProc) { - hash = typePtr->hashKeyProc (tablePtr, (VOID *) key); + hash = typePtr->hashKeyProc(tablePtr, (VOID *) key); if (typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { index = RANDOM_INDEX (tablePtr, hash); } else { @@ -346,9 +346,10 @@ Tcl_CreateHashEntry( continue; } #endif - if (compareKeysProc ((VOID *) key, hPtr)) { - if (newPtr) + if (compareKeysProc((VOID *) key, hPtr)) { + if (newPtr) { *newPtr = 0; + } return hPtr; } } @@ -361,16 +362,17 @@ Tcl_CreateHashEntry( } #endif if (key == hPtr->key.oneWordValue) { - if (newPtr) + if (newPtr) { *newPtr = 0; + } return hPtr; } } } - if (!newPtr) + if (!newPtr) { return NULL; - + } /* * Entry not found. Add a new one to the bucket. @@ -378,7 +380,7 @@ Tcl_CreateHashEntry( *newPtr = 1; if (typePtr->allocEntryProc) { - hPtr = typePtr->allocEntryProc (tablePtr, (VOID *) key); + hPtr = typePtr->allocEntryProc(tablePtr, (VOID *) key); } else { hPtr = (Tcl_HashEntry *) ckalloc((unsigned) sizeof(Tcl_HashEntry)); hPtr->key.oneWordValue = (char *) key; @@ -1132,11 +1134,12 @@ RebuildTable( hPtr->nextPtr = tablePtr->buckets[index]; tablePtr->buckets[index] = hPtr; #else - VOID *key = (VOID *) Tcl_GetHashKey (tablePtr, hPtr); + VOID *key = (VOID *) Tcl_GetHashKey(tablePtr, hPtr); if (typePtr->hashKeyProc) { unsigned int hash; - hash = typePtr->hashKeyProc (tablePtr, (VOID *) key); + + hash = typePtr->hashKeyProc(tablePtr, (VOID *) key); if (typePtr->flags & TCL_HASH_KEY_RANDOMIZE_HASH) { index = RANDOM_INDEX (tablePtr, hash); } else { diff --git a/generic/tclIOGT.c b/generic/tclIOGT.c index 901ced5..2460e4a 100644 --- a/generic/tclIOGT.c +++ b/generic/tclIOGT.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. * - * CVS: $Id: tclIOGT.c,v 1.16 2006/08/30 17:59:03 hobbs Exp $ + * CVS: $Id: tclIOGT.c,v 1.17 2007/04/17 14:49:53 dkf Exp $ */ #include "tclInt.h" @@ -1344,7 +1344,7 @@ ResultCopy( * We have just enough. Copy everything to the caller. */ - memcpy((VOID *) buf, (VOID *) r->buf, (size_t) toRead); + memcpy(buf, r->buf, (size_t) toRead); r->used = 0; return toRead; } @@ -1355,9 +1355,8 @@ ResultCopy( * requested subset to the caller, and shift the remaining bytes down. */ - memcpy((VOID *) buf, (VOID *) r->buf, (size_t) toRead); - memmove((VOID *) r->buf, (VOID *) (r->buf + toRead), - (size_t) r->used - toRead); + memcpy(buf, r->buf, (size_t) toRead); + memmove(r->buf, r->buf + toRead, (size_t) r->used - toRead); r->used -= toRead; return toRead; @@ -1368,7 +1367,7 @@ ResultCopy( * everything. */ - memcpy((VOID *) buf, (VOID *) r->buf, (size_t) r->used); + memcpy(buf, r->buf, (size_t) r->used); toRead = r->used; r->used = 0; return toRead; diff --git a/generic/tclPathObj.c b/generic/tclPathObj.c index e49141f..35a6e37 100644 --- a/generic/tclPathObj.c +++ b/generic/tclPathObj.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: tclPathObj.c,v 1.59 2007/04/10 14:47:17 dkf Exp $ + * RCS: @(#) $Id: tclPathObj.c,v 1.60 2007/04/17 14:49:53 dkf Exp $ */ #include "tclInt.h" @@ -1651,8 +1651,8 @@ Tcl_FSGetTranslatedStringPath( const char *result, *orig; orig = Tcl_GetStringFromObj(transPtr, &len); - result = (char*) ckalloc((unsigned)(len+1)); - memcpy((VOID*) result, (VOID*) orig, (size_t) (len+1)); + result = (char *) ckalloc((unsigned)(len+1)); + memcpy(result, orig, (size_t) (len+1)); TclDecrRefCount(transPtr); return result; } |