diff options
Diffstat (limited to 'src/TMkey.c')
-rw-r--r-- | src/TMkey.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/TMkey.c b/src/TMkey.c index 40a5c19..aa3f8d9 100644 --- a/src/TMkey.c +++ b/src/TMkey.c @@ -456,15 +456,12 @@ _XtBuildKeysymTables(Display *dpy, register XtPerDisplay pd) &pd->keysyms_per_keycode); XtFree((char *) pd->modKeysyms); - pd->modKeysyms = - (KeySym *) __XtMalloc((Cardinal) KeysymTableSize * sizeof(KeySym)); + pd->modKeysyms = XtMallocArray(KeysymTableSize, (Cardinal) sizeof(KeySym)); maxCount = KeysymTableSize; tempCount = 0; XtFree((char *) pd->modsToKeysyms); - table = - (ModToKeysymTable *) __XtMalloc((Cardinal) 8 * - sizeof(ModToKeysymTable)); + table = XtMallocArray(8, (Cardinal) sizeof(ModToKeysymTable)); pd->modsToKeysyms = table; table[0].mask = ShiftMask; @@ -739,7 +736,7 @@ XtKeysymToKeycodeList(Display *dpy, KeyCode *old = keycodes; maxcodes += KEYCODE_ARRAY_SIZE; - keycodes = (KeyCode *) __XtMalloc(maxcodes * sizeof(KeyCode)); + keycodes = XtMallocArray(maxcodes, (Cardinal) sizeof(KeyCode)); if (ncodes) { (void) memcpy(keycodes, old, ncodes * sizeof(KeyCode)); XtFree((char *) old); |