summaryrefslogtreecommitdiff
path: root/src/GCManager.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-03 17:42:47 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-07 00:06:24 +0000
commitb3b0c1ad25a5d0f628eddd00113a40364d68480b (patch)
tree7b1088ab3cc984dd606df1b56fdda7dec975432f /src/GCManager.c
parentb1b54c50d0e5851d72c1e7aff4057687be2e447e (diff)
Replace XtMalloc() calls with XtMallocArray()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/GCManager.c')
-rw-r--r--src/GCManager.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/GCManager.c b/src/GCManager.c
index aa5bbba..1c1a2cd 100644
--- a/src/GCManager.c
+++ b/src/GCManager.c
@@ -250,10 +250,8 @@ XtAllocateGC(register Widget widget,
if (!pd->pixmap_tab) {
int n;
- pd->pixmap_tab =
- (Drawable **)
- __XtMalloc((Cardinal)
- ((unsigned) ScreenCount(dpy) * sizeof(Drawable *)));
+ pd->pixmap_tab = XtMallocArray((Cardinal) ScreenCount(dpy),
+ (Cardinal) sizeof(Drawable *));
for (n = 0; n < ScreenCount(dpy); n++)
pd->pixmap_tab[n] = NULL;
}