summaryrefslogtreecommitdiff
path: root/src/Event.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/Event.c
parentb1b54c50d0e5851d72c1e7aff4057687be2e447e (diff)
Replace XtMalloc() calls with XtMallocArray()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/Event.c')
-rw-r--r--src/Event.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Event.c b/src/Event.c
index 3939a18..b485931 100644
--- a/src/Event.c
+++ b/src/Event.c
@@ -768,10 +768,8 @@ CallEventHandlers(Widget widget, XEvent *event, EventMask mask)
(p->has_type_specifier && event->type == EXT_TYPE(p)))
numprocs++;
}
- proc = (XtEventHandler *)
- __XtMalloc((Cardinal)
- ((size_t) numprocs *
- (sizeof(XtEventHandler) + sizeof(XtPointer))));
+ proc = XtMallocArray((Cardinal) numprocs, (Cardinal)
+ (sizeof(XtEventHandler) + sizeof(XtPointer)));
closure = (XtPointer *) (proc + numprocs);
numprocs = 0;