summaryrefslogtreecommitdiff
path: root/src/TMkey.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-03 16:23:20 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-07 00:06:24 +0000
commitb1b54c50d0e5851d72c1e7aff4057687be2e447e (patch)
tree9f58e135805accd2ce2bd0bf57d19a02c44064e4 /src/TMkey.c
parent4ece1c842a08c11c1f84b95355801d41cd8435b1 (diff)
Replace XtRealloc() calls with XtReallocArray()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/TMkey.c')
-rw-r--r--src/TMkey.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/TMkey.c b/src/TMkey.c
index 2c443c0..40a5c19 100644
--- a/src/TMkey.c
+++ b/src/TMkey.c
@@ -502,9 +502,10 @@ _XtBuildKeysymTables(Display *dpy, register XtPerDisplay pd)
if (keysym != 0 && keysym != tempKeysym) {
if (tempCount == maxCount) {
maxCount += KeysymTableSize;
- pd->modKeysyms = (KeySym *) XtRealloc((char *) pd->
- modKeysyms,
- (unsigned) ((size_t) maxCount * sizeof(KeySym)));
+ pd->modKeysyms =
+ XtReallocArray(pd->modKeysyms,
+ (Cardinal) maxCount,
+ (Cardinal) sizeof(KeySym));
}
pd->modKeysyms[tempCount++] = keysym;
table[i].count++;