diff options
Diffstat (limited to 'src/Initialize.c')
-rw-r--r-- | src/Initialize.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Initialize.c b/src/Initialize.c index ff5eee8..03bb59c 100644 --- a/src/Initialize.c +++ b/src/Initialize.c @@ -668,9 +668,8 @@ _MergeOptionTables(const XrmOptionDescRec *src1, int dst_len, order; enum { Check, NotSorted, IsSorted } sort_order = Check; - *dst = table = (XrmOptionDescRec *) - __XtMalloc((Cardinal) - (sizeof(XrmOptionDescRec) * (num_src1 + num_src2))); + *dst = table = XtMallocArray(num_src1 + num_src2, + (Cardinal) sizeof(XrmOptionDescRec)); (void) memcpy(table, src1, sizeof(XrmOptionDescRec) * num_src1); if (num_src2 == 0) { @@ -786,8 +785,7 @@ _XtPreparseCommandLine(XrmOptionDescRec *urlist, _XtString *targv; int targc = argc; - targv = (_XtString *) - __XtMalloc((Cardinal) (sizeof(_XtString *) * (size_t) argc)); + targv = XtMallocArray((Cardinal) argc, (Cardinal) sizeof(_XtString *)); (void) memcpy(targv, argv, sizeof(char *) * (size_t) argc); _MergeOptionTables(opTable, XtNumber(opTable), urlist, num_urs, &options, &num_options); |