summaryrefslogtreecommitdiff
path: root/src/Threads.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-03 17:42:47 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-03-07 00:06:24 +0000
commitb3b0c1ad25a5d0f628eddd00113a40364d68480b (patch)
tree7b1088ab3cc984dd606df1b56fdda7dec975432f /src/Threads.c
parentb1b54c50d0e5851d72c1e7aff4057687be2e447e (diff)
Replace XtMalloc() calls with XtMallocArray()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/Threads.c')
-rw-r--r--src/Threads.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Threads.c b/src/Threads.c
index 566e71c..de3e38a 100644
--- a/src/Threads.c
+++ b/src/Threads.c
@@ -363,8 +363,7 @@ InitAppLock(XtAppContext app)
#endif
app_lock->stack.size = STACK_INCR;
app_lock->stack.sp = -1;
- app_lock->stack.st =
- (struct _Tstack *) __XtMalloc(sizeof(struct _Tstack) * STACK_INCR);
+ app_lock->stack.st = XtMallocArray(STACK_INCR, sizeof(struct _Tstack));
for (ii = 0; ii < STACK_INCR; ii++) {
app_lock->stack.st[ii].c = xcondition_malloc();
xcondition_init(app_lock->stack.st[ii].c);