summaryrefslogtreecommitdiff
path: root/src/Display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/Display.c')
-rw-r--r--src/Display.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Display.c b/src/Display.c
index 879b71a..c4928a0 100644
--- a/src/Display.c
+++ b/src/Display.c
@@ -346,9 +346,8 @@ _XtAppInit(XtAppContext *app_context_return,
/*
* Save away argv and argc so we can set the properties later
*/
- saved_argv = (_XtString *)
- __XtMalloc((Cardinal)
- ((size_t) (*argc_in_out + 1) * sizeof(_XtString)));
+ saved_argv = XtMallocArray((Cardinal) *argc_in_out + 1,
+ (Cardinal) sizeof(_XtString));
for (i = 0; i < *argc_in_out; i++)
saved_argv[i] = (*argv_in_out)[i];
@@ -817,9 +816,8 @@ XtGetDisplays(XtAppContext app_context,
LOCK_APP(app_context);
*num_dpy_return = (Cardinal) app_context->count;
- *dpy_return = (Display **)
- __XtMalloc((Cardinal)
- ((size_t) app_context->count * sizeof(Display *)));
+ *dpy_return = XtMallocArray((Cardinal) app_context->count,
+ (Cardinal) sizeof(Display *));
for (ii = 0; ii < app_context->count; ii++)
(*dpy_return)[ii] = app_context->list[ii];
UNLOCK_APP(app_context);