summaryrefslogtreecommitdiffstats
path: root/generic/tkImgGIF.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2011-03-12 17:45:37 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2011-03-12 17:45:37 (GMT)
commite0b895874d5fa39f6d4134b407e930b80ee3ecd7 (patch)
tree08a6b50f74f697e9ebc1f689f06d7318c0aa83a2 /generic/tkImgGIF.c
parent77d7867fd5b20233f0fa9163bd8a44d2ac274b0e (diff)
downloadtk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.zip
tk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.tar.gz
tk-e0b895874d5fa39f6d4134b407e930b80ee3ecd7.tar.bz2
Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to be
using useful casts internally.
Diffstat (limited to 'generic/tkImgGIF.c')
-rw-r--r--generic/tkImgGIF.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tkImgGIF.c b/generic/tkImgGIF.c
index 0ece066..05dc109 100644
--- a/generic/tkImgGIF.c
+++ b/generic/tkImgGIF.c
@@ -574,7 +574,7 @@ FileReadGIF(
if (trashBuffer == NULL) {
nBytes = fileWidth * fileHeight * 3;
- trashBuffer = (unsigned char *) ckalloc((unsigned) nBytes);
+ trashBuffer = ckalloc(nBytes);
}
/*
@@ -658,20 +658,20 @@ FileReadGIF(
block.offset[3] = (transparent>=0) ? 3 : 0;
block.pitch = block.pixelSize * imageWidth;
nBytes = block.pitch * imageHeight;
- block.pixelPtr = (unsigned char *) ckalloc((unsigned) nBytes);
+ block.pixelPtr = ckalloc(nBytes);
if (ReadImage(gifConfPtr, interp, block.pixelPtr, chan, imageWidth,
imageHeight, colorMap, srcX, srcY, BitSet(buf[8],INTERLACE),
transparent) != TCL_OK) {
- ckfree((char *) block.pixelPtr);
+ ckfree(block.pixelPtr);
goto error;
}
if (Tk_PhotoPutBlock(interp, imageHandle, &block, destX, destY,
width, height, TK_PHOTO_COMPOSITE_SET) != TCL_OK) {
- ckfree((char *) block.pixelPtr);
+ ckfree(block.pixelPtr);
goto error;
}
- ckfree((char *) block.pixelPtr);
+ ckfree(block.pixelPtr);
}
/*
@@ -688,7 +688,7 @@ FileReadGIF(
*/
if (trashBuffer != NULL) {
- ckfree((char *) trashBuffer);
+ ckfree(trashBuffer);
}
return result;
}