diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-03 16:23:20 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-07 00:06:24 +0000 |
commit | b1b54c50d0e5851d72c1e7aff4057687be2e447e (patch) | |
tree | 9f58e135805accd2ce2bd0bf57d19a02c44064e4 /src/TMkey.c | |
parent | 4ece1c842a08c11c1f84b95355801d41cd8435b1 (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.c | 7 |
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++; |