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/TMaction.c | |
parent | b1b54c50d0e5851d72c1e7aff4057687be2e447e (diff) |
Replace XtMalloc() calls with XtMallocArray()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/TMaction.c')
-rw-r--r-- | src/TMaction.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/TMaction.c b/src/TMaction.c index 3fbc879..c577b71 100644 --- a/src/TMaction.c +++ b/src/TMaction.c @@ -110,8 +110,8 @@ CompileActionTable(register RConst struct _XtActionsRec *actions, register Cardi func = (perm ? XrmPermStringToQuark : XrmStringToQuark); if (!stat) { - cTableHold = cActions = (CompiledActionTable) - __XtMalloc((Cardinal) ((size_t) count * sizeof(CompiledAction))); + cTableHold = cActions = XtMallocArray(count, + (Cardinal) sizeof(CompiledAction)); for (i = (int) count; --i >= 0; cActions++, actions++) { cActions->proc = actions->proc; @@ -761,9 +761,8 @@ XtGetActionList(WidgetClass widget_class, } *num_actions_return = widget_class->core_class.num_actions; if (*num_actions_return) { - XtActionList list = *actions_return = (XtActionList) - __XtMalloc((Cardinal) - ((size_t) *num_actions_return * sizeof(XtActionsRec))); + XtActionList list = *actions_return = + XtMallocArray(*num_actions_return, (Cardinal) sizeof(XtActionsRec)); table = GetClassActions(widget_class); |