summaryrefslogtreecommitdiffstats
path: root/unix/tkUnixKey.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)
commita9b80c492179a73f008fd8cc5aa7e8a7b9e87bf9 (patch)
tree08a6b50f74f697e9ebc1f689f06d7318c0aa83a2 /unix/tkUnixKey.c
parentd27c3b360cd9cb780be362ed6ce435776ca42fc1 (diff)
downloadtk-a9b80c492179a73f008fd8cc5aa7e8a7b9e87bf9.zip
tk-a9b80c492179a73f008fd8cc5aa7e8a7b9e87bf9.tar.gz
tk-a9b80c492179a73f008fd8cc5aa7e8a7b9e87bf9.tar.bz2
Remove casts from uses of ckalloc/ckfree/... now that Tcl declares them to be
using useful casts internally.
Diffstat (limited to 'unix/tkUnixKey.c')
-rw-r--r--unix/tkUnixKey.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c
index 47646b5..a1afffa 100644
--- a/unix/tkUnixKey.c
+++ b/unix/tkUnixKey.c
@@ -204,7 +204,7 @@ TkpGetString(
* from having to reenter the XIM engine. [Bug 1373712]
*/
- kePtr->charValuePtr = ckalloc((unsigned) len + 1);
+ kePtr->charValuePtr = ckalloc(len + 1);
kePtr->charValueLen = len;
memcpy(kePtr->charValuePtr, Tcl_DStringValue(dsPtr), (unsigned) len + 1);
return Tcl_DStringValue(dsPtr);
@@ -417,12 +417,11 @@ TkpInitKeymapInfo(
*/
if (dispPtr->modKeyCodes != NULL) {
- ckfree((char *) dispPtr->modKeyCodes);
+ ckfree(dispPtr->modKeyCodes);
}
dispPtr->numModKeyCodes = 0;
arraySize = KEYCODE_ARRAY_SIZE;
- dispPtr->modKeyCodes = (KeyCode *)
- ckalloc((unsigned) (KEYCODE_ARRAY_SIZE * sizeof(KeyCode)));
+ dispPtr->modKeyCodes = ckalloc(KEYCODE_ARRAY_SIZE * sizeof(KeyCode));
for (i = 0, codePtr = modMapPtr->modifiermap; i < max; i++, codePtr++) {
if (*codePtr == 0) {
continue;
@@ -449,11 +448,10 @@ TkpInitKeymapInfo(
*/
arraySize *= 2;
- newCodes = (KeyCode *)
- ckalloc((unsigned) (arraySize * sizeof(KeyCode)));
+ newCodes = ckalloc(arraySize * sizeof(KeyCode));
memcpy(newCodes, dispPtr->modKeyCodes,
dispPtr->numModKeyCodes * sizeof(KeyCode));
- ckfree((char *) dispPtr->modKeyCodes);
+ ckfree(dispPtr->modKeyCodes);
dispPtr->modKeyCodes = newCodes;
}
dispPtr->modKeyCodes[dispPtr->numModKeyCodes] = *codePtr;