diff options
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); |