diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-03 17:42:47 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2023-03-07 00:06:24 +0000 |
commit | b3b0c1ad25a5d0f628eddd00113a40364d68480b (patch) | |
tree | 7b1088ab3cc984dd606df1b56fdda7dec975432f /src/Event.c | |
parent | b1b54c50d0e5851d72c1e7aff4057687be2e447e (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.c | 6 |
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; |